Dewlance® Forum

Full Version: How to extract or unzip tar.gz file to a specific destination?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You have a filename.tar.gz file and you wish to extract in a specific directory. For example you are in /home folder and wish to extract it into /root directory.


How to extract or unzip filename.tar.gz to a specific destination?
Run this command:
Code:
tar xf filename.tar.gz -C /root/


Other option
Code:
mv /home/filename.tar.gz /root

Means we moved filename.tar.gz from home to /root folder and now run this command.
Code:
tar -xzvf filename.tar.gz


Its simple? Wink