Hoofdstuk 7 Flashcards
Compression on a file works by: -7.1
Making the files smaller by removing redundant information
Lossy compression: - 7.3
Usually results better compression than lossless
Is often used with images
Sacrifices some quality
You type gzip myfile.tar. What happens? 7.3
myfile. tar is removed
myfile. tar.gz holds a compressed version of myfile.tar
Which command would you use to archive the Documents directory and compress it with bzip2 compression? - 7.4
tar cjf documents.tbz
Documents
In the command tar cvjf foo.tbz a b c, what are a, b, and c? -7.4
file names to be added to the archive
Given the command tar cvjf homedirs.tbz /home, which of the following are true? -7.4
The command will print out each filename as it is processed
The output file will be compressed
You archived your users directories into a file called backup.tar.gz. You then view the archive and see the filenames follow this convention: - 7.4
home/username/somefile
How will you extract just the files for the user called fred?
tar xzf backup.tar.gz home/fred/
Which of the following commands can be used to compress a file?
gzip
bzip2
zip
Which two commands do the same thing? -7.4
tar c foo | gzip > foo.tar.gz
tar czf foo.tar.gz foo
How would you obtain output similar to the following?
compressed uncompressed ratio uncompressed_name
278168 1016950 72.6% tags - 7.3
gzip l tags
Which flag would you pass to tar in order to have it make a new archive? -7.4
-c
Which of the following commands will create a zipfile with the contents of your Documents directory? -7.5
zip -r mydocs.zip Documents
You try to compress a file that is already compressed. Which of the following statements is true? - 7.3
The file will not be compressed any further than it already was
The _____ command is normally executed daily to update the database of all files that are on the system. - 7.1
updatedb