MKWii.org

Full Version: Extract/Compress (zip,7z, etc) Cheat Sheet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First install the necessary packages if you don't have them:
sudo apt-get update
sudo apt-get install zip unzip p7zip-full p7zip-rar

To extract plain jane zip files:
unzip Example.zip
or...
7z x Example.zip

Extract zip file to desired location (to /var/www/html)
unzip Example.zip -d /var/www/html

To extract 7z files:
7z x Example.7z

To extract rar files:
7z x Example.rar

To zip folder plus its contents:
Make sure you are in the directory that displays the folder you want to compress
Example: Compressing the "Bob" folder within /home/user/test

1. cd /home/user/test
2. ls (make sure Bob folder is listed)
3. zip -r NameOfNewZip.zip Bob (don't use any slashes)

To create a multipart 7z archive:
Make sure you are in the directory that displays the folder you want to compress
Example: Compressing the "Bob" folder within /home/user/test

1. cd /home/user/test
2. ls (make sure Bob folder is listed)
3. 7z -v900m a NameOfNew7z.7z Bob (don't use any slashes)

NOTE: 900 megabyte splits were used in the example above. Feel free to use any other desired
values. For a 2 gigabyte split, use -v2g.