November 30, 2007
Fear of Flying

Hey - did you know you can run less directly over a gzipped file? Cool.

less /resin-apps/r2apps/log/r2frontend.log.2007-11-29.gz

Posted to Linux by Simon Brunning at November 30, 2007 04:00 PM
Comments

Nice! I always zcatted it, this saves me a step. Thanks.

Posted by: Bill Mill on December 1, 2007 12:37 AM

Actually - you can only do that if your 'less' command is aliased to zless (or somehow otherwise redirected). I think this is a common configuration on some linux systems, but on many unix systems this will not work by default.

Posted by: Chris on December 5, 2007 04:17 PM

Cool! And the other archives work as well.

tar, zip, tgz, bz2 et al.

Posted by: Muthu Ramadoss on December 10, 2007 08:31 AM

Search for LESSOPEN and lesspipe.sh -- in a nutshell, you can specify a pre-processor for viewing files in less.

Posted by: Mark Nottingham on December 28, 2007 07:31 PM
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?