When in linux use the TAR command to preserve file permissions
Compress folder to folder.tar.gz:
1 |
tar -pcvzf file.tar.gz folder |
Uncompress:
Just switch the ‘c’ flag to an ‘x’ to extract
1 |
tar -pxvzf file.tar.gz -C destination_folder |
Cheatsheet:
p == preserve permissions
c == create archive
v == verbose (print names while making tar)
z == gzip
f == tar file name
As read on: www.futurequest.net