Hoofdstuk 7 Flashcards

1
Q

Compression on a file works by: -7.1

A

Making the files smaller by removing redundant information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Lossy compression: - 7.3

A

Usually results better compression than lossless
Is often used with images
Sacrifices some quality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You type gzip myfile.tar. What happens? 7.3

A

myfile. tar is removed

myfile. tar.gz holds a compressed version of myfile.tar

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which command would you use to archive the Documents directory and compress it with bzip2 compression? - 7.4

A

tar cjf documents.tbz

Documents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In the command tar cvjf foo.tbz a b c, what are a, b, and c? -7.4

A

file names to be added to the archive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Given the command tar cvjf homedirs.tbz /home, which of the following are true? -7.4

A

The command will print out each filename as it is processed

The output file will be compressed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

home/username/somefile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How will you extract just the files for the user called fred?

A

tar xzf backup.tar.gz home/fred/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following commands can be used to compress a file?

A

gzip
bzip2
zip

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which two commands do the same thing? -7.4

A

tar c foo | gzip > foo.tar.gz

tar czf foo.tar.gz foo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How would you obtain output similar to the following?
compressed uncompressed ratio uncompressed_name
278168 1016950 72.6% tags - 7.3

A

gzip l tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which flag would you pass to tar in order to have it make a new archive? -7.4

A

-c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following commands will create a zipfile with the contents of your Documents directory? -7.5

A

zip -r mydocs.zip Documents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You try to compress a file that is already compressed. Which of the following statements is true? - 7.3

A

The file will not be compressed any further than it already was

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The _____ command is normally executed daily to update the database of all files that are on the system. - 7.1

A

updatedb

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which command will show whats inside the compressed tarball with a name of foo.tar.gz?

A

tar -tzf foo.tar.gz

17
Q

Given a file called documents.zip, how can you extract just the files under ProjectX? - 7.5

A

unzip documents.zip ProjectX/*

18
Q

In the command tar czf foo.tar.gz bar, what is the purpose of the f flag? -7.4

A

Tells tar to expect a file name as the next argument