Extract files.tar
to the directory ~/some-other-directory
.
You can use this short tar command.
tar -xvf files.tar -C ~/some-other-directory-somewhere
Or this more verbose tar command.
tar --extract --verbose --file files.tar --directory ~/some-other-directory-somewhere
-x
or --extract
tells tar to extract an existing archivev
or --verbose
tells tar to produce verbose outputf
or --file
tells tar that the next parameter will be the tar file to create, extract, append to, list, etc.-C
, --cd
or --directory
tells tar to change (cd
) into the directory before creating, listing, extracting, appending to etc. the archive