This article describes two ways to compress files:
Compressing files enables you to store files using less disk space. For example, if you have some files that you rarely use, it may be worth compressing them so they take up less space. Alternatively, if you need to transfer files to or from your hosting account, it is often easier (and faster) to compress multiple files into one compressed file and transfer that file instead.
There are many types of compressed files: ZIP, RAR, tar, gzip, and more. The following procedures demonstrate how to create some of these types of files.
To compress files using cPanel, follow these steps:
If you are using the Paper Lantern theme, in the FILES section of the cPanel home page, click File Manager:
To select multiple files:
In the Compress dialog box, under Compression Type, select the type of compression to use.
There are many ways to compress files from the command line. The following procedure outlines a few of them:
zip new.zip *
zip -r new.zip *
To decompress the .zip file, use the unzip command. For example:
To create a tar file that contains all of the files in the current directory as well as any subdirectories, type the following command:
tar cvf new.tar *
To decompress a .tar file, use the x option instead of the c option. For example:
tar xvf new.tar
To create a compressed gzip file, type the following command. Replace test.txt with the name of the file you want to compress. This command replaces the existing file with the compressed file (for example, test.txt becomes test.txt.gz):
gzip -r .
To decompress a .gz file, use the gunzip command. For example:
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.