Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.


Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.
Hide

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:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

grep certain file types recursively

Terminal - grep certain file types recursively
grep -r --include="*.[ch]" pattern .
2009-08-13 01:41:12
User: sitaram
Functions: grep
10
grep certain file types recursively

doesn't do case-insensitive filenames like iname but otherwise likely to be faster

Alternatives

There are 5 alternatives - vote for the best!

Terminal - Alternatives
find . -name "*.[ch]" | xargs grep "TODO"
find . -name "*.[ch]" -exec grep "TODO" {} +
2009-08-13 06:17:22
User: peshay
Functions: find grep
Tags: grep
3

-exec works better and faster then using a pipe

grep -r --include=*.php "something" /foo/bar
2014-03-07 13:26:12
User: avpod2
Functions: grep
0

Actually grep can do recursive search based on file extensions.

Know a better way?

If you can do better, submit your command here.

What others think

just add the -i option to grep to get case-insensitivity.

Comment by bwoodacre 388 weeks and 2 days ago

I know its documented the way you say it, so perhaps its a bug I'm seeing. But as of GNU grep 2.5.4 on Mandriva 2009.1, the "-i" only affects the pattern, not the filename

Comment by sitaram 385 weeks and 6 days ago

Any occasion, be it spiritual gatherings, birthday celebrations, wedding parties, etcetera. gives by using it cheerful appearance, choosing good friends and trading gift ideas. If you are purchasing provides for your loved ones, you would like an existing that can tell these people of yourself. When you shell out several hours on selecting the correct point for everybody, it is possible which they might not exactly want it or perhaps might not use it. Just lately, the popularity utilizing branded promotional products since gifts possesses acquired plenty of popularity.As a firm or as a person, providing personalized gifts for her to everyone during fun would definitely make it easier to interact with them greater. Additionally, these items are typically customized, that's why, no need to hang out and also in picking out presents for many. They've also been great around the pants pocket, so that you can present quality gifts within your budget. Advertising bags are already just about the most chosen alternatives http://www.hermesbeltsbirkinkellybag.co.uk/ for business products in addition to presenting. Pointed out here are a few ways in which you can utilize these types of bags regarding Christmas time.For Organizations- Add some topic and colors regarding Christmas on the cheap or perhaps cardstock bags you actually provide for a shoppers.- If you are planning to give goodie bags to your consumers and also employees, make certain you use durable hand bags who have the brand within your business custom made to fit the particular festival.- Presenting an excellent hold bag for your buyers using your advertising communication product and xmas gift ideas, will take ones special offers another mile.- Recently back packs using super-hero lighting and colours are quite common. Increase anyone logo and Christmas images to them and use these individuals as reveals.- Existing a bag with useful messages as well as estimates concerning the festival and wishes out of your organization.For Individuals- Present bags created from hand-made paper or maybe fabric with your snapshot with the family member.- When you have an enormous family it's also possible to provide little pouches with just your current wants in addition to label on it.- For children you are able to supply a little goodie bag shaped like any Father christmas Clause sack, using your individual wants for the kids.- Put in a angle towards the regular notebook or workplace bags through adding removable Christmas designed key rings in addition to add-ons.- Existing drawstring as well as duffle bags as well as handmade cards to include in the festival involving presenting.Get exclusive custom made published bags coming from MARCO Promotional items, and also rejoice the time of year regarding merriment.of MARCO Discount Products

Comment by stephanieg915 5 days ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-au-canada-prix_54.html,http://www.canadagoosefemmehomme2016.fr/manteau-goose-canada-femme_149.html,http://www.canadagoosefemmehomme2016.fr/site-canada-goose_352.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-camp-hoody_50.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-parka-banff-homme_403.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-rennes_423.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-outlet-france_122.html,http://www.canadagoosefemmehomme2016.fr/victoria-parka-canada-goose_338.html,http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose-femme_44.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-fourrure_377.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-new-york-prix_159.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-rabais_88.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-kensington_86.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-victoria-parka_462.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-parka-femme_349.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-rouge_118.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-cramoisi_47.html,http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose_330.html,http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-prix_395.html,http://www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-france_401.html,http://www.canadagoosefemmehomme2016.fr/soldes-canada-goose_137.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-boutique-en-ligne_184.html,http://www.canadagoosefemmehomme2016.fr/gilets-canada-goose_370.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-toulouse_459.html,http://www.canadagoosefemmehomme2016.fr/blouson-canada-goose_156.html,http://www.canadagoosefemmehomme2016.fr/canada-goose-noir-homme_384.html,http://www.canadagoosefemmehomme2016.fr/adresse-magasin-canada-goose-montreal_297.html,http://www.canadagoosefemmehomme2016.fr/selkirk-canada-goose_77.html,http://www.canadagoosefemmehomme2016.fr/promo-canada-goose_263.html,http://www.canadagoosefemmehomme2016.fr/solaris-parka-canada-goose_110.html,http://www.canadagoosefemmehomme2016.fr/c

Comment by sguerra376 4 days ago

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-d-occasion_466.html

www.canadagoosefemmehomme2016.fr/canada-goose-site_385.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-france_265.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose-canada_416.html

www.canadagoosefemmehomme2016.fr/canada-goose-expedition_268.html

www.canadagoosefemmehomme2016.fr/ontario-canada-goose_96.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-prix_254.html

www.canadagoosefemmehomme2016.fr/doudoune-canadian-goose_205.html

www.canadagoosefemmehomme2016.fr/magasin-d-usine-canada-goose_331.html

www.canadagoosefemmehomme2016.fr/manteau-hiver-canada-goose_480.html

www.canadagoosefemmehomme2016.fr/vente-canada-goose-montreal_160.html

www.canadagoosefemmehomme2016.fr/canada-goose-stockholm_43.html

www.canadagoosefemmehomme2016.fr/parajumpers-ou-canada-goose_87.html

www.canadagoosefemmehomme2016.fr/site-officiel-canada-goose_432.html

www.canadagoosefemmehomme2016.fr/canada-goose-parajumpers_49.html

www.canadagoosefemmehomme2016.fr/canada-goose-��-paris_227.html

www.canadagoosefemmehomme2016.fr/canada-goose-parka_61.html

www.canadagoosefemmehomme2016.fr/canada-goose-chine_250.html

www.canadagoosefemmehomme2016.fr/manteau-goose-canada-femme_149.html

www.canadagoosefemmehomme2016.fr/acheter-canada-goose-pas-cher_124.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-homme_298.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose_398.html

Comment by sguerra376 3 days ago

www.canadagoosefemmehomme2016.fr/citadel-parka-canada-goose_62.html

www.canadagoosefemmehomme2016.fr/canada-goose-promotion-france_98.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-femme_373.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-femme_191.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-doudoune_101.html

www.canadagoosefemmehomme2016.fr/borden-canada-goose_442.html

www.canadagoosefemmehomme2016.fr/boutique-canada-goose_378.html

www.canadagoosefemmehomme2016.fr/montebello-parka-canada-goose_287.html

www.canadagoosefemmehomme2016.fr/canada-goose-resolute_66.html

www.canadagoosefemmehomme2016.fr/goose-canada-pas-cher_140.html

www.canadagoosefemmehomme2016.fr/gilet-canada-goose_185.html

www.canadagoosefemmehomme2016.fr/canada-goose-fourrure-amovible_71.html

www.canadagoosefemmehomme2016.fr/parajumpers-ou-canada-goose_87.html

www.canadagoosefemmehomme2016.fr/canada-goose-taille-grand-ou-petit_112.html

www.canadagoosefemmehomme2016.fr/foxe-bomber-canada-goose_392.html

www.canadagoosefemmehomme2016.fr/canada-goose-violette_121.html

www.canadagoosefemmehomme2016.fr/chilliwack-canada-goose_485.html

www.canadagoosefemmehomme2016.fr/le-bon-coin-canada-goose_157.html

www.canadagoosefemmehomme2016.fr/canada-goose-chelsea_326.html

www.canadagoosefemmehomme2016.fr/canada-goose-lodge_76.html

www.canadagoosefemmehomme2016.fr/canada-goose-pbi_252.html

www.canadagoosefemmehomme2016.fr/doudoune-homme-canada-goose_366.html

Comment by sguerra376 3 days ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-enfant_264.html

http://www.canadagoosefemmehomme2016.fr/goose-canada-pas-cher_140.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-blanc_171.html

http://www.canadagoosefemmehomme2016.fr/une-canada-goose_222.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-doudoune-femme_69.html

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose-chateau_400.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pbi-chilliwack-bomber_73.html

http://www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-france_401.html

http://www.canadagoosefemmehomme2016.fr/magasin-canada-goose-france_216.html

http://www.canadagoosefemmehomme2016.fr/boutique-canada-goose-montreal_456.html

http://www.canadagoosefemmehomme2016.fr/gilets-canada-goose_370.html

http://www.canadagoosefemmehomme2016.fr/site-officiel-canada-goose_432.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-france_265.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-rennes_423.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-en-france_127.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-langford_320.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-parka_111.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-boutique-en-ligne_184.html

http://www.canadagoosefemmehomme2016.fr/vrai-canada-goose-pas-cher_40.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-cramoisi_47.html

http://www.canadagoosefemmehomme2016.fr/

Comment by sguerra376 2 days ago

www.canadagoosefemmehomme2016.fr/canada-goose-accessoires_183.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose_330.html

www.canadagoosefemmehomme2016.fr/canada-goose-mountaineer_477.html

www.canadagoosefemmehomme2016.fr/acheter-canada-goose-paris_406.html

www.canadagoosefemmehomme2016.fr/une-canada-goose_222.html

www.canadagoosefemmehomme2016.fr/chilliwack-bomber-canada-goose_372.html

www.canadagoosefemmehomme2016.fr/canada-goose-occasion_413.html

www.canadagoosefemmehomme2016.fr/boutique-canada-goose-paris_302.html

www.canadagoosefemmehomme2016.fr/bonnet-canada-goose_289.html

www.canadagoosefemmehomme2016.fr/canada-goose-luxembourg_51.html

www.canadagoosefemmehomme2016.fr/manteau-goose-canada-femme_149.html

www.canadagoosefemmehomme2016.fr/fr-canada-goose_182.html

www.canadagoosefemmehomme2016.fr/parka-montebello-canada-goose_379.html

www.canadagoosefemmehomme2016.fr/canada-goose-fourrure-coyote_244.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose-femme_206.html

www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-france_401.html

www.canadagoosefemmehomme2016.fr/selkirk-canada-goose_77.html

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-a-paris_387.html

www.canadagoosefemmehomme2016.fr/canada-goose-le-bon-march��_461.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-enfant_83.html

www.canadagoosefemmehomme2016.fr/canada-goose-toronto-outlet_483.html

www.canadagoosefemmehomme2016.fr/casquette-canada-goose_134.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-occasion_164.html

www.canadagoosefemmehomme2016.fr/canada-goose-bomber-chilliwack_119.html

www.canadagoosefemmehomme2016.fr/canada-goose-sans-fourrure_311.html

www.canadagoosefemmehomme2016.fr/site-officiel-canada-goose_432.html

Comment by sguerra376 1 day ago

www.canadagoosefemmehomme2016.fr/lodge-hoody-canada-goose_133.html

www.canadagoosefemmehomme2016.fr/vente-canada-goose_194.html

www.canadagoosefemmehomme2016.fr/canada-goose-marron_208.html

www.canadagoosefemmehomme2016.fr/usine-canada-goose_85.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-femme_373.html

www.canadagoosefemmehomme2016.fr/boutique-canada-goose-france_117.html

www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

www.canadagoosefemmehomme2016.fr/manteau-homme-canada-goose_82.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-noir_170.html

www.canadagoosefemmehomme2016.fr/canada-canada-goose_246.html

www.canadagoosefemmehomme2016.fr/doudoune-style-canada-goose_283.html

www.canadagoosefemmehomme2016.fr/canada-goose-promo_172.html

www.canadagoosefemmehomme2016.fr/canada-goose-champs-elysees_360.html

www.canadagoosefemmehomme2016.fr/canada-goose-montreal_267.html

www.canadagoosefemmehomme2016.fr/canada-goose-victoria-parka_462.html

www.canadagoosefemmehomme2016.fr/manteau-canada-goose-homme-pas-cher_341.html

www.canadagoosefemmehomme2016.fr/canada-goose-enfant_264.html

www.canadagoosefemmehomme2016.fr/site-officiel-de-canada-goose_435.html

www.canadagoosefemmehomme2016.fr/goose-canada-pas-cher_140.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-homme-pas-cher_426.html

www.canadagoosefemmehomme2016.fr/blouson-canada-goose-femme_143.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-langford_425.html

www.canadagoosefemmehomme2016.fr/canada-goose-parka_61.html

www.canadagoosefemmehomme2016.fr/le-bon-coin-canada-goose_157.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-femme_123.html

Comment by sguerra376 17 hours ago

Your point of view

You must be signed in to comment.