Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 02-16-2014, 05:14 AM   #1
LQ Newbie
Registered: Feb 2014
Posts: 2

Rep: Reputation: Disabled
compressed files

all my downloads are compressed, how do i unzip them?.
Old 02-16-2014, 05:32 AM   #2
Registered: May 2001
Posts: 29,358
Blog Entries: 55

Rep: Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545Reputation: 3545
What downloads? Compressed how? Details please!
Old 02-16-2014, 09:18 PM   #3
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 12,486
Blog Entries: 16

Rep: Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207Reputation: 3207
Most file managers, when you right-click on a file to bring up the context menu, offer a "decompress" option.

If they are *.tar files of any type (tar.gz, tar.bz2, etc.) files, tar -xvf [filename] should work on the command line.

If they are *.rar files, you will need to find an unrar command if none is installed. See man unrar. If there is no mah(ual) entry for unrar, it's a safe bet no "unrar" is installed.

For *.zip files, see man unzip.

And details help persons answer your question; too much detail is better than too little. This link will help ask Linux Questions.

Last edited by frankbell; 02-16-2014 at 09:20 PM.
1 members found this post helpful.
Old 02-16-2014, 09:44 PM   #4
LQ Newbie
Registered: Nov 2013
Posts: 5

Rep: Reputation: 1
I'm editing my comment because it's been pointed out to be incorrect. frankbell and evo2 are correct that you don't need to specify the file type on modern tars. I should have tested it out before posting. My apologies for an incorrect statement.

Last edited by cgrady357; 02-16-2014 at 11:31 PM. Reason: incorrect statement
Old 02-16-2014, 10:36 PM   #5
LQ Guru
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Originally Posted by cgrady357 View Post
The tar statement listed below is incorrect. If you want to extract tar.gz using tar, you would use "tar -xvzf filename".
No, what Frank posted was correct. "Modern" versions of tar will automatically determine if the file is compressed (and what the compression algorithm is) and decompress it without additional flags on the command line.

The z option gunzips the file, then the file is extracted.
Which is usesless if xz, bzip2, or whatever was used.

The best way to figure out what tool to use is google the file extension.
Best way is to let tar work it out for you.

1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Using split and tar to get the compressed files ytyyutianyun Linux - Newbie 10 12-12-2013 07:08 PM
Password Protected compressed files script jedilost1 Linux - Newbie 15 11-25-2008 02:49 PM
Pre-Compressed Files matsko Linux - Software 1 05-02-2008 06:12 PM
How do I download and unzip compressed files? Whatshisface Linux - Newbie 4 03-21-2004 01:33 PM
gzip compressed files jamaso Linux - Newbie 4 01-13-2002 04:59 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration