How can I unzip a .vw.gz file in Linux?
tar -xvf filename
throws errors.
.gz
is a gzipped file and is not related to tar
. You do, more often than not, see a tarred and gzipped file that is first tarred, then gzipped (like somfile.tar.gz
) but those are two seperate operations that are supported by a single tar
command.
To unzip a gzipped file you use the gunzip
command.
gunzip filename.vw.gz
The confusion here is that many of us are used to .zip
files. zip
fulfills two needs.
tar
is an archiving program. If you check out it's manpage in Ubuntu man tar
you'll see:
tar — The GNU version of the tar archiving utility
gzip
is a compression program. It's manpage man gzip
reads:
gzip, gunzip, zcat - compress or expand files
So in this case we have two programs to compress and archive.
The other confusing bit is that we almost always use the tar
command to do both archiving and compressing, but you'll see in it's manpage that you can specify the compression program to use. For instance we can compress in tar
using the bzip compression algorithm:
tar -jcvf archive_name.tar.bz2 /path/to/some/dir