- #1
mathman44
- 207
- 0
Firstly, I've literally never used a Linux machine in my life. My phys prof thought it would be a good idea to get us acquainted with the system, but didn't want to actually teach it...
The following is an exercise in Linux. I'm having a lot of trouble finding the commands to accomplish this.
1. Enter the command to print out the date in coordinated universal time (UTC). (Hint: Use a
variant of the man command to help you find the appropriate command.) Now, enter the
same command again, but this time redirect (append) the output to a file called Assign2.txt
by following the command with the expression “>> Assign2.txt” (without quotation
marks).
2. Create a directory called Phy258Ass2 in your home area.
3. Move the file Assign2.txt into the new directory you just created.
4. Change to the new directory Phy258Ass2, i.e., make it your current directory.
5. To confirm that this worked, enter the command to print your current (working) directory.
Re-enter the command, this time redirecting (appending) the output to the file Assign2.txt.
6. Enter the id command to print your user and group IDs. Again, redirect the output to the
Assign2.txt file.
7. The id command has an option that gives you the version of the id program and its authors. Find this option and use it, again redirecting the output to the Assign2.txt file.
8. Find the command that reports file system disk space usage. Use the command and also
redirect its output to the Assign2.txt file.
9. Choose one of the text editors available on the Linux computer to insert the text “Phys 258, Assignment 2”, your name, your ID number, and your lab section at the
top of the file Assign2.txt. Follow this with a line stating the name of the Linux text editor
that you used. Take care not to disturb or alter the text data that you already have in this
file. Exit from the text editor, making sure that your changes get saved.
10. View the file you have just finished creating by using either the more or less command.
11. From a different computer with printing capability, use secure ftp (sftp) to retrieve a copy
of your Assign2.txt file on the applicable undergraduate physics Linux computer. (Note
that the PuTTY package comes with an sftp utility.)
Here is my attempt at googling the corresponding commands:
1. date -u
2. mkdir Phys258Ass2
3. mv Assign2.txt Phys258Ass2
4. cd Phys258Ass2
5. ls -f
6. id -u
7.
8. df
9.
10.
11.
:S
The following is an exercise in Linux. I'm having a lot of trouble finding the commands to accomplish this.
Homework Statement
1. Enter the command to print out the date in coordinated universal time (UTC). (Hint: Use a
variant of the man command to help you find the appropriate command.) Now, enter the
same command again, but this time redirect (append) the output to a file called Assign2.txt
by following the command with the expression “>> Assign2.txt” (without quotation
marks).
2. Create a directory called Phy258Ass2 in your home area.
3. Move the file Assign2.txt into the new directory you just created.
4. Change to the new directory Phy258Ass2, i.e., make it your current directory.
5. To confirm that this worked, enter the command to print your current (working) directory.
Re-enter the command, this time redirecting (appending) the output to the file Assign2.txt.
6. Enter the id command to print your user and group IDs. Again, redirect the output to the
Assign2.txt file.
7. The id command has an option that gives you the version of the id program and its authors. Find this option and use it, again redirecting the output to the Assign2.txt file.
8. Find the command that reports file system disk space usage. Use the command and also
redirect its output to the Assign2.txt file.
9. Choose one of the text editors available on the Linux computer to insert the text “Phys 258, Assignment 2”, your name, your ID number, and your lab section at the
top of the file Assign2.txt. Follow this with a line stating the name of the Linux text editor
that you used. Take care not to disturb or alter the text data that you already have in this
file. Exit from the text editor, making sure that your changes get saved.
10. View the file you have just finished creating by using either the more or less command.
11. From a different computer with printing capability, use secure ftp (sftp) to retrieve a copy
of your Assign2.txt file on the applicable undergraduate physics Linux computer. (Note
that the PuTTY package comes with an sftp utility.)
The Attempt at a Solution
Here is my attempt at googling the corresponding commands:
1. date -u
2. mkdir Phys258Ass2
3. mv Assign2.txt Phys258Ass2
4. cd Phys258Ass2
5. ls -f
6. id -u
7.
8. df
9.
10.
11.
:S
Last edited: