I thought I’d share incase anybody else runs into the problem and needs to tar or gzip a file on their server.
How to tar and then how to gzip (compress) a file in SSH
When you are logged into SSH this command line should tar and then gzip your folder into a .tar.gz file. This will gzip your file into the current directory:
tar -czf whatever.tar.gz foldername
If you’d like to tar your file and have it put in another location use this:
tar -czf /directory/directory/whatever.tar.gz foldername
How to untar and how to ungzip (or unzip) a file in SSH:
This will untar and uncompress your file, then it will place that folder in the directory you are currently in restoring your old folder and file structure:
gunzip -dc whatever.tar.gz | tar xvf -
Thank you, and good night.
thanks. this helped!
Thanks for stopping by and I’m glad this helped you out Athan.
thanks man great pos
Thanks a lot, this is near the top when you google “how to tar” and so will help a lot of people…