viewing contents of tar/tar.gz/tgz files

Martin Pitt martin.pitt at canonical.com
Mon Oct 18 08:00:38 UTC 2004


Hi!

volvoguy [2004-10-18  3:49 -0400]:
> I'll admit - I'm no command line whiz, so the answer to my question
> may be embarrasingly simple.
> 
> I'm used to being able to run:
> 
> less somefile.tar.gz
> 
> and have it display the contents of the file.
> 
> When I do this in Ubuntu, I get the message:
> 
> '"somefile.tar.gz" may be a binary file.  See it anyway?'
> 
> So what's different in Ubuntu that it doesn't allow me to do what I've
> been doing for years on other distros?

less does not support gzipped files by default. If you want to display
such a file, use zless (there is also zcat, zgrep, etc.).

But less might not be the most appropriate program to browse a tar
archive anyway...

Just as a side note, the Midnight Commander (mc) handles many
archive-type files very nicely, you can browse them like a directory.

Martin

-- 
Martin Pitt                       http://www.piware.de
Ubuntu Developer            http://www.ubuntulinux.org
Debian GNU/Linux Developer       http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20041018/d88ab616/attachment.sig>


More information about the ubuntu-users mailing list