shellspells beta

tar

tar [-] A --catenate --concatenate | c --create | d --diff --compare |
    --delete | r --append | t --list | --test-label | u --update | x
    --extract --get [options] [pathname ...]

tar stores and extracts files from a tape or disk archive.

Originally used for copying files to tape, nowadays it's mainly used to archive a load of files or directories into one file. It has gzip built in so the files can be compressed when the archive is created.

Examples

Create an archive of a directory (create, verbose, file)

$ tar cvf alien.tar aliens

Create a gzip compressed archive of a directory (create, zip, verbose, file)

$ tar czvf alien.tar.gz aliens

Uncompress - works with both zipped and non-zipped archives (extract, verbose, file)

$ tar xvf alien.tar.gz