viewing contents of tar/tar.gz/tgz files

John dingo at coco2.arach.net.au
Mon Oct 18 08:19:30 UTC 2004


Jim Cheetham wrote:
> On Oct 18, 2004, at 8:49 PM, volvoguy wrote:
> 
>> less somefile.tar.gz
>>
>> and have it display the contents of the file.
> 
> 
> Surely some mistake? A tar file is in tar format - less will show you 
> the tar format?
> Are you thinking of "tar ztvf somefile.tar.gz" which will show you the 
> table of contents/file list of a tar file? You would often pipe that 
> through less ...
> 
> $ tar ztvf somefile.tar.gz | less
> 
> -jim
> 
> 

Nope.
less can do all sorts of magic that the U folk might want to implement 
much as Red Hat did years ago.

Automatically recognise and decompress compressed files. Automatically 
recognise tarballs and list their contents.


read up on lessopen.




More information about the ubuntu-users mailing list