Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: leifanator on October 21, 2010, 06:52:24 PM
-
Most of the programs I want to use do not come in .tgz format. How can I get an app that extracts these?
Is there a terminal command?
-
.tgz and .tar.gz are the same thing.
tar xvf file
-
To be a bit more verbose:
tar option to extract: x
tar option to produce verbose output (i.e. list file names): v
tar option to (de)compress with gzip (for .tgz or .tar.gz files): z
tar option to (de)compress with bzip2 (for .tar.bz2 files): j
tar option to (de)compress with compress (for .tar.Z files): Z (but those file are now getting pretty rare)
tar option to specify file name: f FILE (with '-' for FILE in case of stdin/out)
Please note that at least for older versions of 'GNU tar' to work with .tar.gz or .tar.bz2 files the 'z' or 'j' options had to be used. The 'BusyBox tar' (default in TC) "guesses" the archive file format and you get away (in most cases) with not using either of them. I personally stick with the (old) habit of always specifing 'z' or 'j', but YMMV.
Furthermore a 'tar' man page can be found here (http://linux.die.net/man/1/tar) Be aware that it's for the 'GNU tar', but the subset of the parameters that BusyBox supports are also be found there.
Edit: Following Jasons remark (in reply #3) I've reworded my "warning" regarding the use of the 'z' and 'j' options.
-
I have good results using "tar xvf" to untar any tgz, tar.gz, tar.bz2, and tar.xz files with GNU tar, I never use the J, j, or z switches nowadays.