Opening a tar file on Linux couldn’t be easier. Navigate to the directory of your tar file and enter the following command:

tar -zxvf yourfile.tar.gz

This will extract the contents of yourfile.tar.gz in your current working directory. Depending on the permissions of this directory you might need to add sudo in front of the above command, followed by the password for your sudo-user:

sudo tar -zxvf yourfile.tar.gz

If you’d rather untar this file to a different directory, add the -C flag followed by the directory you wish to extract the contents of yourfile.tar.gz to:

tar -zxvf -C ~/MyFolder/ yourfile.tar.gz

1 Comment

Move contents of folder up one level – New England Code · February 20, 2019 at 2:46 pm

[…] I download WordPress and extract it, all files reside within the wordpress/ subdirectory. To simply copy all those files up one […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.