It appears you have not registered with our community. To register please click here ...

Author Topic: compression  (Read 861 times)

bobbaz

  • Newbie
  • *
  • Posts: 12
  • Karma: +10/-0
    • View Profile
    • Email
compression
« on: January 19, 2006, 07:57:16 AM »
Hi,
how is it possible to decompress a tar-file on linux? Do I need a Winzip-program as under Windows?

Bobbaz

dynaweb

  • <b>Canine Deamon</b>
  • Administrator
  • Sr. Member
  • *****
  • Posts: 493
  • Karma: +10/-0
  • Generic personal text here ...
    • MSN Messenger - danno_d_manno@yahoo.com
    • View Profile
    • DynaWeb Designs
    • Email
Decompressing files in Linux
« Reply #1 on: January 19, 2006, 08:49:07 AM »
Compression / Uncompression capability should be built in to your Linux. Here is how to handle a file with a .tar.gz extension:

[INDENT]With files that have the .tgz, tar.gz, or tar.z extension use this command:
Code: [Select]
tar -zxvf [filename with all extensions]

example: tar -zxvf filename.tar.gz
 
This will extract the file for you in the directory you are currently in. Using the above command will save you from having to redirect the output for gzip or anything else (because the z option automatically decompresses the file for you), otherwise without the z argument, you would have to do a command like this:[/INDENT]

Other ways to decompress files are to use:
[INDENT]
Code: [Select]
gunzip [filename with .gz extension]
[RIGHT][I]- example: [COLOR=blue]gunzip filename.gz[/I][/COLOR][/RIGHT]

Code: [Select]
zcat [filename with .gz extension]
[RIGHT][I]- example: [COLOR=#000080]zcat [/COLOR][/I][COLOR=blue][I]filename.gz[/I][/COLOR][/RIGHT]

Code: [Select]
uncompress [yourfilename with .z extension]
[RIGHT][I]- example: [/I][COLOR=#0000ff][I]uncompress filename.z[/I][/COLOR][/RIGHT]

[/INDENT]

Remember to check your file permissions and ownership if you are uncompressiong scripts, especially cgi/perl.
« Last Edit: January 19, 2006, 09:26:39 AM by dynaweb »
Those who cannot learn from history are doomed to repeat it. -- Linux learns.