Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have downloaded a file, and the instructions on using the material say to "unpack it in the usual way using tar". The file has an extension of .tgz and when I do "tar -xf file.tgz" it fails with messages "tar: this does not look like a tar archive" etc. What am I doing wrong?
The file needs to be gunzipped first. try this:
tar -zxf your-file.tgz
The "z" flag uncompresses gzipped files. You would do the same to unzip/tar your-file.tar.gz
Like wise with:
tar -jxf your-file.tar.bz2
you can uncompress bzip2'd files.
To find out what any given file type is, and then determine your needs (for uncompressing in this situation) to work with the file, use the command 'file'. So:
file filename
And if 'filename' is a tar.gz file with the extensions removed, file will tell you exactly what it is, or appears to be.
A .tgz file is the same as a .tar.gz, the extension is just different.
You can unpack it by using tar -zxf filename, or if you want to see what it's doing use tar -zxvf filename.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.