This chapter describes the basic operations supported by the
tar program. A given invocation of
tar will do exactly one of these operations.
An archive member in normally extracted into a file with the same name as the archive member. However, you can use the `–to-stdout’ (`-O’) to cause
tar to write extracted archive members to standard output. If you extract multiple members, they appear on standard output concatenated, in the order they are found in the archive.
The `–create’ (`-c’) operation writes a new archive, and the `–extract’ (`-x’) operation reads files from an archive and writes them into the file system. You can use other
tar operations to write new information into an existing archive (adding files to it, adding another archive to it, or deleting files from it), and you can read a list of the files in an archive without extracting it using the `–list’ (`-t’) operation.
The primary argument to
tar is the operation, which specifies what
tar can be used to:
- Add files to an existing archive—`–append’ (`-r’).
- Compare files in an archive with files in the file system—`–compare’ (`-d’) or `–diff’.
- Add archives to another archive—`–concatenate’ (`-A’).
- Create an archive—`–create’ (`-c’).
- Delete files from an archive—`–delete’.
- Extract files from an archive—`–extract’ (`-x’) or `–get’.
- List the files in an archive—`–list’ (`-t’).
- Update an archive by appending newer versions of already stored files—`–update’ (`-u’).
rianto utomo bole nyontek dari http://www.math.utah.edu/docs/info/tar_4.html