Dana Vrajitoru
C151 Multi-User Operating Systems

Homework 2

Due date: Monday, January 30, 2012.

Ex. 1. Just as before, you will need to copy the content of the terminal to a file called hw2.txt.

At this point copy the contents of the terminal to the text file and you can save it and close it. The rest of the homework doesn't need to be in it.

Ex. 2 Archiving files

List all the files starting with an m from the directory /bin. Suppose that we want to create an archive of these files. Without changing your current directory (if you changed it before, go back to your home directory), create the archive with the following command:
tar cf binm.tar /bin/m*

List the files in the current directory to see if the archive was created correctly. List the files contained in the archive with the following command:
tar tf binm.tar

List all the files in the current directory with a long list of attributes.

Compress the tar file created at the previous step with the command gzip:
gzip binm.tar

List the files again with the option -l to compare the size of the archive before and after the compression with gzip.

Ex. 3.

Save the content of the terminal to a file called hw2.txt and upload it and the archive file you created to Homework 2 on Oncourse in Assignments 2. Add as a comment in the submission for the complete (absolute) path to the file icing.jpg that you copied in your home directory. At this point I should be able to see it if you did these operations well. This completes your homework.