Archive and compress using tar, star, gzip, and bzip2 Flashcards

1
Q

What does tar do

A

Archives files,, does not handle compression

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

what tar flag creates a new archive

A

-c

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

What tar flag lists contents of an archive

A

-f

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

What tar flag extracts files from an archive

A

-x

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

What tar flag compresses or uncompresses a file in gzip

A

-z

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

What tar flag compresses or uncrompesses a file in bzip2

A

-j

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

What tar flag reads archive from or to a file

A

-f

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

How would you archive two files hello, and world, into helloworld.tar

A

tar -cf helloworld.tar hello world

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

How would you list all files in helloworld.tar

A

tar -tvf helloworld.tar

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

How would you archive and compress two files hello and world uzing gzip

A

tar -czvf helloworld.tar.gz hello world

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

How would you uncompress and extract files from helloworld.tar.gz

A

tar -zxvf helloworld.tar.gz

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

What is star

A

Archiving utility generally used to archive large sets of data; includes pattern-matching and searching features

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

What flag creates an archive with star

A

-c

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

what flag shows results of running a command without executing the actions in star (dry run)

A

-n

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

What flag lists contents of file in star

A

-f=

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

What flag extracts a file in star

A

-x

17
Q

How do you see the difference of files in star

A

–diff

18
Q

Archive file1 and file2 into archive.tar using star

A

star -c f=archive.tar file1 file2

19
Q

Archive /home/user/file1 and /home/user/file2 into archive.tar using star without changing the current directory

A

star -c -C /home/user -f=archive.tar file1 file2

20
Q

Extract archive.tar using star

A

star -x f=archive.tar

21
Q

List contents of archive.tar using star

A

star -t -f=archive.tar

22
Q

what is gzip

A

Comrpession utility used to reduce file size; generally used with tar; files are unavailable until unpacked.