next up previous contents
Next: Disk Usage Up: Basic Directory Commands Previous: Searching Directories

Archiving Directories

Entire directory structures may be archived to a single file with the tar command. The format for archiving with the tar command is:

tar cvf filename.tar directory1

Where filename.tar is the name of the resulting tar file and directory1 is the name of the directory that you wish to archive. Note that the original directory is not affected by the archiving operation, the archive is a copy of all the files and information contained in the directory.

The format for unarchiving a tar file is:

tar xvf filename.tar

The directory structure that was saved to the tar file is restored to the directory where the unarchiving command is given.

Some of the more useful options for tar are:

Care should be used when untar'ing a file to disk as it may clobber existing disk files you may have.


next up previous contents
Next: Disk Usage Up: Basic Directory Commands Previous: Searching Directories
World Wide Web Administrator
1/5/1999