Kompressi File dengan GZip dan Zip di CentOS

komputer, tips & trik Add comments

Gzip
Type the following command to compress a file at a shell prompt
gzip filename.ext -> The file will be compressed and saved as filename.ext.gz

Type the following command to expand a compressed file
gunzip filename.ext.gz -> The filename.ext.gz is deleted and replaced with filename.ext

Type the following command to compress multiple files at a shell prompt
gzip filename.gz file1 file2 file3 -> will compress file1, file2, file3 and put them in filename.gzip.

Zip
Type the following command to compress a file at a shell prompt
zip -r filename.zip files -> filename represents the file you are creating and files represents the files you want to put in the new file

Type the following command to expand a compressed file
unzip filename.zip

Type the following command to compress multiple files at a shell prompt
zip filename.zip file1 file2 file3 -> will compress file1, file2, file3 and put them in filename.zip

If you add directory to multiple files
zip filename.zip file1 file2 file3 /user/work/school -> will compress file1, file2, file3, the contents of the /user/work/school directory and put them in filename.zipc

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in