Skip to content

Tuesday, February 9th, 2010

New Linux User

More from ‘less’

January 30, 2009 by Clair Ching  
Filed under General

I learned something new today about the less command:

When you need to look at the contents of the tar.gz file you downloaded, you could actually use the command less to list them for you!

$ less yourfile.tar.gz

what happens when you use less
Image credit: Clair Ching, 2009. Screenshot posted on Flickr.

This is a sample of the output of the less command. You don’t have to extract the file’s contents before you could check if all the files you are expecting to be there.

This is thanks to the article on ServerWatch :) It’s called Reading Compressed Files with Less.

Another tip I got from the article is that you could list contents of .gz files with zless instead of less. There are other useful commands in the article and maybe you’d be able to use them depending on what your needs are. If you’re not using a GUI environment you already have a tool for listing files. :) I have to admit using the desktop environments and window managers like GNOME and OpenBox more so I’ve been relying on the tools available with them.

  • StumbleUpon
  • Digg
  • Facebook
  • Mixx
  • Google
  • TwitThis
  • Reddit
  • Yahoo! Buzz
  • Slashdot
  • E-mail this story to a friend!

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


About Us | Advertise with us | Blog for EveryJoe | Privacy Policy | Terms of Use
Get This Theme | Sitemap


All content is Copyright © 2005-2010 b5media. All rights reserved.