The TAR command is one of those built-in utilities that makes Linux (and of course UNIX) so great. It allows you to make an archive of a directory (or a series of files).
You would use it like so…
- cd to root folder
- tar -cvzf name.tgz dir
This makes a tar archive of dir.
- tar -xvf name.tgz
This will extract the archive name.tgz wherever you are.
tar -xvf file.tar.gz -C /some/dir/
This will change to /some/dir/ and extract file.tar.gz there.