Forrest logo
tool overview
On this page you find all important commands for the CLI tool tar. If the command you are looking for is missing please ask our AI.

tar

GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored.

List of commands for tar:

  • linux:tar:create:gzip [c]reate a g[z]ipped archive and write it to a [f]ile.
    $ tar czf ${path-to-target-tar-gz} ${filename1 filename2 ---}
    try on your machine
    explain this command
  • linux:tar:create:tar [c]reate an archive and write it to a [f]ile.
    $ tar cf ${path-to-target-tar} ${filename1 filename2 ---}
    try on your machine
    explain this command
  • linux:tar:decompress Decompress the given tar file
    $ tar -zxvf ${filename}
    try on your machine
  • tar:tldr:52f42 tar: Lis[t] the contents of a tar [f]ile [v]erbosely.
    $ tar tvf ${path-to-source-tar}
    try on your machine
    explain this command
  • tar:tldr:64877 tar: E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely.
    $ tar xvf ${select}
    try on your machine
    explain this command
  • tar:tldr:9e120 tar: E[x]tract a (compressed) archive [f]ile into the target directory.
    $ tar xf ${select} --directory=${path-to-directory}
    try on your machine
    explain this command
  • tar:tldr:a9329 tar: [c]reate a g[z]ipped archive from a directory using relative paths.
    $ tar czf ${path-to-target-tar-gz} --directory=${path-to-directory} .
    try on your machine
    explain this command
  • tar:tldr:c3df1 tar: E[x]tract files matching a pattern from an archive [f]ile.
    $ tar xf ${path-to-source-tar} --wildcards "${*-html}"
    try on your machine
    explain this command
  • tar:tldr:e18bf tar: [c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program.
    $ tar caf ${path-to-target-tar-xz} ${filename1 filename2 ---}
    try on your machine
    explain this command
tool overview