- Forums
- Linux
- How To Compress File In A Directoy In Linux
wi will teach you How To Compress File In A Directoy In Linux with a simple UNIX shell terminal console command [3255], Last Updated: Mon Jun 24, 2024
Webune Tutorials
Thu Oct 15, 2009
0 Comments
365 Visits
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