[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System User's Guide: Operating System and Devices

Archiving Files (tar Command)

You can write files to or retrieve files from an archive storage with the tar command. The tar command looks for archives on the default device (usually tape), unless you specify another device.

When writing to an archive, the tar command uses a temporary file (the /tmp/tar* file) and maintains in memory a table of files with several links. You receive an error message if the tar command cannot create the temporary file or if there is not enough memory available to hold the link tables.

For example, to write the file1 and file2 files to a new archive on the default tape drive, enter:

tar -c file1 file2

For example, to extract all files in the /tmp directory from the archive file on the /dev/rmt2 tape device and use the time of extraction as the modification time, enter:

tar -xm -f/dev/rmt2 /tmp

For example, to display the names of the files in the out.tar disk archive file from the current directory, enter:

tar -vtf out.tar

See the tar command in the AIX Version 4.3 Commands Reference for more information and the exact syntax.

Related Information

Commands Overview

Processes Overview

Input and Output Redirection Overview

File Systems Overview

Directory Overview

Files Overview

File and System Security


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]