RSS

package file and folder with gzip, gunzip, tar

29 Dec

In Linux, file and folder always package to .tar or .gz or .tar.gz . Install package usually packing follow this way. With Linux administrator, we need to know that thing.

Gzip use to compress file and gunzip use to extract(decompress) package.

Default, after compress, original file will delete Syntax:

$ gzip [option] [name_files]

$ gunzip [option] [file_achieve]

Separation files and folders is spacebar

Important option:

-f

–force

Force overwrite of output file

-l

–list

List compressed file contents

-q

–quiet

Suppress warning

-t

–test

Test compress file integrity

-1

–fast

Compress faster

-9

–best

Compress better

You can see more:

help command gzip

Example:

clip_image002

Tar is same thing, but after compress, original file keep on.

Important option:

-cvf

Compress file, folder

-xvf

Extract from achieve file

 

Example:

clip_image003

written by hotdream1990

 
 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s