How to extract tar to another directory

From razwiki
Revision as of 02:05, 1 December 2021 by Razzi (talk | contribs) (Created page with " tar -xf files.tar -C ../../ <ref>https://www.tecmint.com/extract-tar-files-to-specific-or-different-directory-in-linux/</ref> From the tar man page:<syntaxhighlight lang="te...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
tar -xf files.tar -C ../../

[1]

From the tar man page:

     -C directory, --cd directory, --directory directory
             In c and r mode, this changes the directory before adding the following files.  In x mode, change directories after opening the archive but before
             extracting entries from the archive.