Search gzipped files

zcat /usr/share/man/man1/grep.1.gz | grep "color"
This decompresses the file and sends the output to STDOUT so it can be grepped. A good one to put in loops for searching directories of gzipped files, such as man pages.
Sample Output
groups of context lines) with escape sequences to display them in color
The colors are defined by the environment variable
This variable specifies the color used to highlight matched (non-empty) text.
It can only specify the color used to highlight
Specifies the colors and other attributes
The default is empty (i.e., the terminal's default color pair).
The default is empty (i.e., the terminal's default color pair).
each time a colorized item ends.

-7
By: root
2009-02-04 09:38:45

What Others Think

Better use zgrep instead: zgrep color /usr/share/man/man1/grep.1.gz
eterps · 650 weeks and 5 days ago
Agreed, zgrep is better because zcat wont cat non-gzipped files whereas zgrep does.
lucasrangit · 613 weeks and 1 day ago
kitchen remodeling nashville I am amazed by the way you have explained things in this article. This article is quite interesting and I am looking forward to reading more of your posts. Thanks for sharing this article with us.
yeoyeo · 36 weeks and 4 days ago
awesome. learned alot. keep posting more painters lubbock
looneyhans · 22 weeks and 6 days ago
Wow, this is really interesting reading. I am glad I found this and got to read it. Great job on this content. I like it. TestoPrime Testosterone Booster
KayGasaway · 20 weeks and 2 days ago
Only strive to mention one's content can be as incredible. This clarity with your post is superb! Thanks a lot, hundreds of along with you should go on the pleasurable get the job done. ?????
KayGasaway · 20 weeks and 1 day ago
I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. ??
KayGasaway · 19 weeks and 5 days ago
very interesting keep posting. ???????
KayGasaway · 19 weeks ago
Pretty nice post. I just stumbled upon your weblog and wanted to say that I have really enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon! ???
KayGasaway · 18 weeks and 3 days ago
This is a great high resolution screen which you have shared for the users. Making a website is not an easy task but managing a good website is really a hard work. As far as this website is concerned, I am very happy. The Float Life
KayGasaway · 17 weeks and 2 days ago
Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us. Onewheel Accessories
KayGasaway · 16 weeks and 5 days ago
I want to say thanks for beautiful blog sharing with us. Your blog really great resource to update my knowledge. Computer Support and Services near me Beverlywoods Los Angeles, California
KayGasaway · 16 weeks and 1 day ago
Best work you have done, this online website is cool with great facts and looks. I have stopped at this blog after viewing the excellent content. I will be back for more qualitative work. ??????
KayGasaway · 16 weeks ago
I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed... ?????
hiknigarde · 13 weeks and 5 days ago
thanks for the tips and information..i really appreciate it.. http://www.ottawatirewholesalers.ca">Ottawa Rims
KayGasaway · 12 weeks and 2 days ago
You guardians do an astounding web diary, and have some unfathomable substance. Continue doing extraordinary. ?????joker
jackson2321 · 12 weeks and 1 day ago
Thanks for taking the time to discuss that, I feel strongly about this and so really like getting to know more on this kind of field. Do you mind updating your blog post with additional insight? It should be really useful for all of us. eye doctor near me
KayGasaway · 10 weeks and 6 days ago
Slots sites are the most popular search online, that is why we try to collect the Best Slots Sites ??here as a list for convenience over time. Best Slots Sites
KayGasaway · 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: