doingword.com

How to compress a directory with tar

February 21st, 2007

Hi Guys,
If we need make a backup of a directory, the best options is use tar.
For example, you have a directory called /home/emanuelq/files and you would like to compress this directory,you can type tar command as follows:

  1. tar -zcvf backup.tar.gz /home/emanuelq/files

The above command will create an archive called backup.tar.gz in the current directory.
If you want to extract the content of the file you need to run this command.

  1. tar -vxfz backup.tar.gz

The above command will be extract the files in the current directory.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Entry Filed under: Linux


Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed