[wellylug] Very Simple Command

Stephen Judd sljudd at paradise.net.nz
Sat Oct 11 10:10:29 NZDT 2003


On Sat, 2003-10-11 at 23:03, Enkidu wrote:
> On Sat, 11 Oct 2003 08:28:01 +1300, you wrote:
> 
> >
> >I need to be able to extract .tar.gz & .tar.bz2 files from the command
> >line.
> >What are the 2 commands? I've looked in the man files, but I can't get
> >it going how I want it.
> >
> >I want to be able to extract the file directly, keeping the original
> >archive.
> >
> tar zxvf <filename> for tar.gz file. There's an extra parameter for
> bz2 files. Make sure you are in the directory where you want to
> extract the files to before you run it.

Not extra - different.

Reviewing the flags one by one:

f = read from a file, rather than from stdin.
x = eXtract the contents
v = be Verbose so the user can see what's happening. (You can get more
verbose output by putting an extra v in).
z = source file is compressed with gzip
j = source file is compressed with bzip2.

The v is optional, but it's handy in that you then get feedback from tar
about what it's doing.

Stephen




More information about the wellylug mailing list