Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Others => Miscellaneous => Topic started by: keen_prat on March 05, 2004, 01:58:02 PM

Title: Extracting files from bz2 , tar.gz, zip, and other archives
Post by: keen_prat on March 05, 2004, 01:58:02 PM
Hi..
I am not new to linux but I mostly do my work on graphical interface.. So can any one tell me how i can decompress the files in tar.gz , bz2, zip and other archieve in linux using command line ?

Thank you!..
Title: Extracting files from bz2 , tar.gz, zip, and other archives
Post by: neo on March 05, 2004, 05:19:58 PM
ok u may use tar
the typical syntax is
 
Code: [Select]
tar -xvzf <filename>
Title: Extracting files from bz2 , tar.gz, zip, and other archives
Post by: keen_prat on March 05, 2004, 06:31:25 PM
what about bz2 ? will it use the same tar -xvzf <filename> ?
Title: Extracting files from bz2 , tar.gz, zip, and other archives
Post by: aaa on March 05, 2004, 06:32:37 PM
for tar only: tar -xvf file.tar
for tar.gz : tar -xvzf file.tar.gz
for gzip only: gzip -d file.gz
for bzip2 : bzip2 -d file.bz2
for zip: unzip file.zip
Title: Why different formats?
Post by: wittyguysuku on May 10, 2004, 12:54:29 PM
Hi Frndz,
           Why should we use different file formats?
           Which one is best?

Thanks in advance,
Suku :D
Title: Extracting files from bz2 , tar.gz, zip, and other archives
Post by: Ricky on May 10, 2004, 01:41:03 PM
basically files with bz2 are the smallest ie.. having highest compression.. and tar.gz is the most common one..
Title: Extracting files from bz2 , tar.gz, zip, and other archives
Post by: dragoncity99 on May 10, 2004, 04:03:51 PM
Also there is one format know as .tgz which we call a  tarball. It's normally used in Slackware. But in other distros it's still usable.

tgz : gunzip filename.tgz | tar -xvf
Title: How to Pack files?
Post by: wittyguysuku on May 11, 2004, 05:38:45 AM
How to pack some number of files into a single pack?
How to compress the files?

Please give me detailed How to?  :idea:

Thanks,
Suku
Title: Extracting files from bz2 , tar.gz, zip, and other archives
Post by: yesgokul on May 12, 2004, 02:17:55 AM
To compress a folder named fld1 u need to use

tar -cvvjf  fld1.tar.bz2  fld1


Thats it.... pls not its not a necessity to give fld1.tar.bz2, u can give any name but to distinguish it as a bz2 file we name it so.

for tar.gz files

tar -cvvzf fld1.tar.gz fld1

the best place to know more is,

open a terminal & shoot "man tar"

u'll find all the options there.....

Thanks
Gokul