Shared Flashcard Set

Details

CBT - Gzip, Bzip2, Unzip, tar
Compression, linux, RHEL
18
Computer Science
Professional
06/29/2011

Additional Computer Science Flashcards

 


 

Cards

Term
Instead of compression, what does tar provide
Definition
tar is a file roller - rolls together multiple files
Term
gzip
gunzip
Definition
gzip compresses or decompresses files
gunzip - decompresses files
Term

Where does gzip output go by default (without redirection)

What happens when you enter "gzip filename"

Definition

STDOUT - needs redirection ex: gzip -c source.txt > source.txt.gz


filename is compressed into filename.gz


Term
How do you find out if gzip was successful?
Definition
echo the last exit status after running gzip - exit status of 0 is successful:
$echo $?
Term
create a gzip file from source.txt
Definition
gzip -vc source.txt > source.txt.gz
Term
find out what type of file foo.bar is?
Definition
file foo.bar
Term
decompress source.txt.gz - two answers
Definition
gunzip source.txt.gz
gzip -d source.txt.gz
Term
read source.txt.gz without decompressing
-two answers
Definition
zcat source.txt.gz
less source.txt.gz
Term
Where is bzip2 usually better than gzip
Definition
on files larger than 5MB it tends to get better compression
Term
compress source.txt using bzip2 compression, use verbose
Definition
bzip2 -vc source.txt > source.txt.bz2
Term
view the contents of source.txt.bz2
- two answers
Definition
bzcat source.txt.bz2
less source.txt.bz2
most source.txt.bz2
Term
zip source.txt
Definition
zip source.txt.zip source.txt
as in: zip (destination) (source)
Term
put all the files in directory FooDir into a tarball
Definition
tar -cvf FooDir.tar ./FooDir
Term
roll up and compress directory FooDir use gzip compression
Definition
tar -czvf FooDir.tar.gz ./FooDir
Term
What does "tar -czvf Foo.tar.gz Foo" mean
Definition
tar (c)create, (z)gzip compress, (v)verbose, (f)specify file archive as Foo.tar.gz using Foo as the source
Term
create a Bzip2 compressed tar file out of FooDir directory
Definition
tar -cjvf FooDir.tar.bz2 ./FooDir
Term
decompress and unroll FooDir.tar.bz2
Definition
tar -xvf FooDir.tar.bz2
-x, for extract
Term
extract FooDir.tar.gz
Definition
tar -xvf FooDir.tar.gz
Supporting users have an ad free experience!