Unix

Common Unix Commands

Tar

Packages files into archive. -p preserves file attributes and permissions and -z uses gzip to compress.  To tar a directory preserving not only permissions, but ownership flag use be

tar -czvfp file.tar.gz folderToCompress 
p - preserve permissions
c - create archive
v - verbose (print names while making tar)
z - gzip
f - tar file name