LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   compressed files (https://www.linuxquestions.org/questions/linux-newbie-8/compressed-files-4175495103/)

colin.herd 02-16-2014 05:14 AM

compressed files
 
all my downloads are compressed, how do i unzip them?.

unSpawn 02-16-2014 05:32 AM

What downloads? Compressed how? Details please!

frankbell 02-16-2014 09:18 PM

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.

cgrady357 02-16-2014 09:44 PM

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.

evo2 02-16-2014 10:36 PM

Hi,
Quote:

Originally Posted by cgrady357 (Post 5118990)
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.

Quote:

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

Quote:

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.

Evo2.


All times are GMT -5. The time now is 12:15 AM.