Please note: This page is imported from my wiki, which hasn't been updated in over 10 years. Some of the formatting was lost during the import. I'll try to get around to fixing it someday.
tar is a unix utility used to archive a collection of files into an archive. Usually the archive is zipped by gzip for efficient storage. A tar archive is often referred to as a tarball
tar -cvzf nameofarchive.tar.gz
tar -xvzf nameofarchive.tar.gz
The default behaviour for symbolic links is to archive them as the links to the appropriate part of the file system. You can for a symbolic link to be substituted for a file by using the -h switch (or —dereference):
tar -cvzfh nameofarchive.tar.gz
Andrew McDonough is a consultant CTO and software developer, currently based between Berlin and London.
Follow Andrew on Twitter or Connect on LinkedIn