How to extract tar to another directory

From razwiki
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.