h4x3d.com

- h4x3d.com

how-to tar.gz a directory

Do you know the following situation- You are downloading thousands of (small) files from your ftp (server) and it is annoyingly slow and time consuming… If you have shell access to your server, e.g. you can use Putty, logon and cd to your file directory (often httpdocs or www) and execute the following code:

tar -pczf fatfile.tar.gz *

This will create a tar.hz archive with the name of fatfile.tar.gz
It will include all files of the current directory and all sub-directories.

Now you can easily download this file instead of many small files (as experienced before).
If you don’t have shell access (look- even Dreamhost offers this feature for $6,95/month),
you might consider getting your own Virtual Private Server as I did.

6 comments
  1. butt says:
    Author

    i want to butt secks

  2. Munhq says:
    Author

    This is a command,not a code exactly

  3. ms says:
    Author

    How Do I undo this? This is not what I was looking for and now all my files are corrupted and display odd characters.

Submit comment