Department of Statistics

University of Illinois at Urbana-Champaign

TAR - Tape ARchive

Crash course on using tar

A tar file is a collection of files. In its most basic use, the tar command adds files to a tar file or extracts files from a tar file. The tar command is so useful because you can easily move tarfiles around. Altough the name tar (which comes from Tape Archive) refers to a tape, you don't need to use a tape. A tar file conventionally ends with a .tar suffix.

|Format of the tar command|Flags|Examples|Gotchas & Common Mistakes|What Next?|


A simple format of tar is

tar [flags] [the location or name of the tar file] [files to add or extract]


These are the most useful tar flags:


|Simple create, extract, update|Moving files between systems|Creating a list of files to include in a tarfile|

Gotchas & Common Mistakes

Some common problems with tar: |Overwriting files|Infinite writing loop|Rootless tarfiles|

What Next? Using Man

Now that you have the basics down, you should be able to use the man pages to get even more use out of the tar command: man tar
Up to Department of Statistics Help Index

Back to Department of Statistics home page

Last Updated 4/2/97

email comments