HW_Linux1 - $ cd $ ls-lh-rwxr-xr-x 1 vastro29 vastro29 120K...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
a) How many files were in the "gunzipped" archive? The “tarred” file had 2 files: $ cd tutorial/examples/ $ tar -xvf w3browse-284011.tar me/rates/b/b56012.lc.Z me/rates/a/a56012.lc.Z b) How long were they? $ cd me/rates/ $ ls -lhR (The h displays "human" units and the R is for recursive. You don’t need to use these modifiers; you’ll just get the answer in bytes instead.) -rw-rw-r-- 1 vastro29 vastro29 56K 1999-03-05 21:23 a56012.lc.Z -rw-rw-r-- 1 vastro29 vastro29 62K 1999-03-08 12:30 b56012.lc.Z We can read that the 2 files are 56K and 62K (Kilobytes) long. Looking at it without the –h, you would get 57135 and 63279 bytes, respectiviely. c) How long was the original "compressed" file?
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: $ cd . ./. ./ $ ls -lh-rwxr-xr-x 1 vastro29 vastro29 120K 2008-03-26 15:53 w3browse-284011.tar The original tarred file was 120K, or 122,880 bytes. d) How much space was saved by having the files transferred in a "zipped" compressed manner? Comparing the compressed tarred file of 122,880 bytes to the two uncompressed files, we find that both a56012.lc and b56012.lc file are 195,840 bytes long. $ gunzip a56012.lc.Z $ ls -lh -rw-rw-r-- 1 vastro29 vastro29 192K 1999-03-05 21:23 a56012.lc The uncompressed files together are almost 400Kb long. Compare that to the size when compressed (120K) and we can see the advantage of using compressed files....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online