cli-tarHow do I use tar command line arguments?
The tar
command line utility is used to store, list, and extract files from an archive file. The command line arguments used with tar
can be broken down into the following categories:
- Create an archive
-c
: Create an archive-f
: Specify the filename of the archive-v
: Display progress information-z
: Compress the archive with gzip-j
: Compress the archive with bzip2
Example
tar -cvf my_archive.tar ./my_folder
- List the contents of an archive
-t
: List the contents of an archive
Example
tar -tf my_archive.tar
- Extract files from an archive
-x
: Extract files from an archive
Example
tar -xf my_archive.tar
For more information, see the GNU tar manual.
More of Cli Tar
- How do I use the command line to tar and zip files?
- How do I use the command line to tar and distribute files?
- How do I use the command line to tar and zip a file?
- How do I use the tar command on Windows?
- How do I use the shell to tar and zip files?
- How do I use the Unix tar zip command?
- How do I use the command line to tar and zip a file?
- How do I use the Unix tar xvf command to extract files?
- How do I extract files from a tar archive using the cmd command?
- How do I use tar and gzip to password protect a file?
See more codes...