PDA

View Full Version : Uncompressing files via the terminal?




AppleMatt
Jun 27, 2003, 05:34 PM
A while ago I read a comment on versiontracker that uncompressing files via the terminal was upto 20% faster than suffit.

Now I actually need to uncompress files via the terminal, can someone please tell me how to do this? I've searched my heart out and all I get is contents lists for training CD's

AppleMatt



Nermal
Jun 27, 2003, 06:15 PM
What sort of files are you trying to decompress? I don't know how to decompress .sit files, but .tar and .gz and be done using the "tar" command. You usually type something like "tar -zxf filename", but the "zxf" can change depending on what type of file it is.

AppleMatt
Jun 27, 2003, 06:27 PM
ah, excellent Nermal thanks.

It is a .gz file. Do you know how to specify another drive? It is resided on the second partition, I would like to unizip it to a directory on the desktop (first partition).

If not, I'll just copy it across then uncompress, just would be interesting to learn a few new things while doing this.

AppleMatt

mc68k
Jun 27, 2003, 08:34 PM
gunzip also works for decompressing .gz files

type in man gunzip for details

gunzip takes a list of files on its command line and
replaces each file whose name ends with .gz, -gz, .z, -z,
_z or .Z and which begins with the correct magic number
with an uncompressed file without the original extension.
gunzip also recognizes the special extensions .tgz and
.taz as shorthands for .tar.gz and .tar.Z respectively.

evildead
Jun 29, 2003, 04:22 PM
the syntax for gunzip is like this

gunzip yourFile.gz <destination>


for example lets say your .gz file is on a second drive or partition and you want to uncompress it to your desktop

you want to go to the location of the .gz file first

# cd /volumes/drive2/folder/

then uncompress it from there

gunzip yourFile.gz /users/username/desktop/


the command cd changes you to a directory. you can go backwards by doing a cd ..

the command ls lists all the files in the your current dirctory

jakerspigglywin
Feb 12, 2008, 11:51 PM
So I have this .md5 movie file and my friend said I need to uncompress it. He's a PC user so he has no idea how to do this on a mac. Could someone take me step through step on how to do this?