How To Compress File In A Directoy In Linux

RegisterLogin
How To Compress File In A Directoy In Linux
Post Description: wi will teach you How To Compress File In A Directoy In Linux with a simple UNIX shell terminal console command
Tags: How, To, Compress, File, In, A, Directoy, In, Linux
This Post Was Posted On Oct 15, 2009 By Webune Tutorials #2578
thank you for visiting our forums. if you are a Webune Customer you are going to find this short guide very helpful. you as you know, if you have a dedicated server from us, its important to know how to make backups of your files.

the best way to backup your files is to compress them into smaller size files.

you have two options.

ZIP

or

TAR

Webune recommends that you compress your files using tar.

so tar a file in a directory is easy, lets say i want to compress all the files in: /var/www/web directory and my backupf file will be called mybackups.tar.gz this is how i would do it

go to the parent directory of your files directory:
cd /var/www/


now compress all the files in the web/ directory:
tar -pczf mybackups.tar.gz web/


thats it
©2011 Webune Forums - Thu Dec 22, 2011 2:07 am
Powered by: Webune Forums V3