How to compress a directory with tar
Wednesday, February 21st, 2007Hi 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:
-
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.
-
tar -vxfz backup.tar.gz
The above command will be extract the files in the current directory.
Posted in Linux | No Comments »

