I want to unpack a .tar.gz file to a specific directory.
The archive file is in /root/Documents. I want to unzip it into /root/Desktop/folder. The folder structure in zipped file should be preserved in the destination directory.
You have two choices:
tar zxf /root/Documents/file.tar.gz
tar zxf file.tar.gz -C /root/Desktop/folder
gzip -dc archive.tar.gz | tar -xf - -C /destination
tar -xvjf foo.tar.bz2
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
4 years ago
4 days ago