Running Zip on the command line is essential to being a highly efficient Web Developer. Zipping files into a group of compressed files that can be shared or stored.
Install zip
Zip Commandline Examples
Zip the uploads_pxs to uploads_pxs.zip
1
| zip uploads_pxs.zip -r uploads_pxs
|
Zip contents of current directory
Zip command Explanation:
zip: This is the command to create a zip archive. -r: Recursively include all files and directories within the specified directory. archive.zip: This is the name of the zip file you want to create. You can replace archive.zip with whatever name you prefer. .: This represents the current directory. It tells the zip command to include all files and directories within the current directory in the archive
Show what will be zipped
1
| zip uploads_pxs.zip -r uploads_pxs -sf
|
Unzip command
1
| unzip file.zip -d destination_folder
|
Tar
1
| tar -zxvf yourfile.tar.gz
|
Get the zip file
1
| wget https://www.imagemagick.org/download/ImageMagick.tar.gz
|
Gunzip
decompress a file that has been compressed using the gzip (GNU zip) compression utility.