How to Unzip?
# unzip file.zip -d destination_folder
# unzip filename.zip -d /home/admin/web/example.com/public_html/
How to Zip?
# zip -r filename.zip directory -x .*
# zip -r filename.zip /home/admin/web/example.com/public_html/ -x .*
How to unzip and zip file from the Terminal?
Re: How to unzip and zip file from the Terminal?
sudo apt-get install zip
creating a zip file:
zip -r compressed_filename.zip foldername
exclude hidden files:
find /folder_path -path '*/.*' -prune -o -type f -print | zip ~/compressed_filename.zip [email protected]
creating a zip file:
zip -r compressed_filename.zip foldername
exclude hidden files:
find /folder_path -path '*/.*' -prune -o -type f -print | zip ~/compressed_filename.zip [email protected]
Re: How to unzip and zip file from the Terminal?
zip -r zipfile.zip directory -x directory/.*
Re: How to unzip and zip file from the Terminal?
TAR Example for excluding all folders beginning with:
tar cvpzf filename.tgz folder/ --exclude '.*'
Better compress (slower):
tar cvpjf filename.tar.bz2 folder/ --exclude '.*'
tar cvpzf filename.tgz folder/ --exclude '.*'
Better compress (slower):
tar cvpjf filename.tar.bz2 folder/ --exclude '.*'