4 ms·
> 6. List contents of tar.gz and extract only one file > tar -ztvf file.tgz > tar -zxvf file.tgz filename Tar no longer requires the modifier for the compres
by Tepix 9y ago
> 6. List contents of tar.gz and extract only one file
> tar -ztvf file.tgz
> tar -zxvf file.tgz filename
Tar no longer requires the modifier for the compression when extracting an archive. So no matter if it's a .tar.gz, .tar.Z, .tar.bz2, etc you can just use "tar xvf"
- kaushalmodi 9y agoAnd the same for compression.. tar caf foo.tar.xz foo/ The extension of the file after the `f` switch tells tar what compression to use. c - compress a - auto
- otherflavors 9y agoby tar you mean gnu tar