Just another quick note to myself since I always forget to remember this.
To compress the whole of the entire current directory into a compressed tar/gz file:
# tar cvz [--remove-files] -f mytarfile.tgz .
c == create
v == verbose
f == output file
z == compress
–remove-files == optionally remove files after adding them to the archive
. == current directory contents
To see what you’ve done:
# tar --list -f mytarfile.tgz
I always forget to use the -f
I always use tar vs. zip since tar remembers file permissions whereas zips do not (that may have changed, don’t care).