linux:classnotes:rh134:tar-files:tar
Tar
required commands
-c or –create | Create an archive file |
---|---|
-t or –list | List the contents of an archive |
-x or –extract | Extract an archive |
The following tar command general options are often included:
-v or –verbose | Show the files that are being archived or extracted during the tar operation |
---|---|
-f or –file | Follow this option with the archive file name to create or open |
-p or –preserve-permissions | Preserve the original file permissions when extracting |
–xattrs | Enable extended attribute support, and store extended file attributes |
–selinux | |
-C | specify directory where you will extract the tar file |
The following tar command compression options are used to select an algorithm:
-a or –auto-compress | Use the archive's suffix to determine the algorithm to use |
---|---|
-z or –gzip | Use the gzip compression algorithm, which results in a .tar.gz suffix |
-j or –bzip2 | Use the bzip2 compression algorithm, which results in a .tar.bz2 suffix |
-J or –xz | Use the xz compression algorithm, which results in a .tar.xz suffix |
linux/classnotes/rh134/tar-files/tar.txt · Last modified: by 127.0.0.1