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

list all file extensions in a directory

Terminal - list all file extensions in a directory
find . -type f | awk -F'.' '{print $NF}' | sort| uniq -c | sort -g
2011-02-14 09:15:29
User: cp
Functions: awk find sort uniq
11
list all file extensions in a directory

... plus do a sort according frequency

Alternatives

There are 3 alternatives - vote for the best!

Terminal - Alternatives
ls -Xp | grep -Eo "\.[^/]+$" | sort | uniq
2011-02-10 20:47:59
User: Amarok
Functions: grep ls sort
Tags: uniq ls grep
4

Works on current directory, with built-in sorting.

find /some/path -type f -printf '%f\n' | grep -o '\..\+$' | sort | uniq -c | sort -rn
2013-03-18 14:42:29
User: skkzsh
Functions: find grep sort uniq
2

Get the longest match of file extension (Ex. For 'foo.tar.gz', you get '.tar.gz' instead of '.gz')

find /path/to/dir -type f | grep -o '\.[^./]*$' | sort | uniq
2010-08-12 14:32:48
User: dooblem
Functions: find grep sort
1

Just a little simplification.

find /path/to/dir -type f -name '*.*' | sed 's@.*/.*\.@.@' | sort | uniq
2010-08-12 15:48:54
User: putnamhill
Functions: find sed sort
1

If your grep doesn't have an -o option, you can use sed instead.

ls | grep -Eo "\..+" | sort -u

Know a better way?

If you can do better, submit your command here.

What others think

Seeking the bag as outlined by the dressIf you happen to be fashion chasing woman, warm using design color material, opt for the bag that is organize using the stylish firmness; inside the counter, if you appreciate attire the actual genuine coloring fabric, the actual colourful in addition to vibrant opulent bag is actually most appropriate. Some girls like the T-Shirt, health club match in addition to relaxed clothing, in that way, you require the tough bag which are produced from pvc, plastic materials, cloth and so on. Also, different girls that are feeling such as seeking the knitwear, vareuse and many others, I'm able to report that this wide lace, bed linen in addition to gentle pure cotton materials bags are a lot easier more wholesome. Your bag texture and consistancy must adjust together with the advance of your clothing content, mainly because it could make you look more harmonious.Selecting the bag http://www.hermesbeltsbirkinkellybag.co.uk/ consistent with your faceSome females have distinct plumage, enthusiastic brow, protrude face and so on, this kind encounter has a minor tomboy, before you choose bag you ought to get the examine pattern bag that has very little manly: however the beautiful woman, like the females who've gentle sight, around nasal and also oval confront and so on, you may choose the actual tasteful bags which have always this tahitian, paillette along with wide lace and so forth.Picking this bag according to statureWhen this bag is actually under your supply, viewed with the entrance, this breadth on the bag is a dilemma you need to be more conscious of. The plump girls who've ample chest, stable waist, My partner and i firmly suggest the thin in addition to extended rectangle bag. To the contrary, girls whose statures including kids, their particular breasts are generally toned, bodies are quite skinny, i believe, you will greater pick the thicker triangle bags. In the event the ladies love the substantial bags, the height is the issue which you should think carefully. The girls who definitely have the actual more than 165cm levels, you can choose the 60cm time-span bag which often can store a novel; below the 157cm level, the actual 50cm size bag that may carry a magazine should be the best option. Choosing this bag good functionsSometimes, many of us buy a bag simply because its beautiful physical appearance. Even though the overall look of the bag is essential, simultaneously, your features in the bag is not disregarded. Several bags have a very telephone bank account outdoors, it is possible to put in the particular dog pen. It could be easier. Besides, we are able to discover some pockets on your little bags, money as well as critical outer bag. We can declare that it really is clever along with handy.Above the many tips of deciding on this bag, it is possible to pick the bag in accordance with your preferred just one.

Comment by stephanieg915 1 day ago

Promoting items are an easy way to showcase your enterprise. They may be reasonably priced, entertaining to give up and promotion your organization while long since they are all-around. The sole bad thing is you will likely have plenty of great marketing goods it is not easy to find out what of which to give up.A great deal of organizations opt for promotional items which supplement the type of business. For example: Some sort of chicken wings shop may well provide fridge magnetic field for buyers in order that their particular number is actually conspicuously displayed with the food prep whatsoever instances. In the event that everyone in your own home contains a longing for pizzas, the total amount is suitable there. Handy merchants or maybe magazine is an acronym which offer coffee could fingers out java glasses.Selecting promotional things that tend to be on the house for your company promotes your organization properly, but you'll come across other factors you should help make any time determining which usually merchandise to purchase. Consider your own market. What forms of items will your visitors or perhaps clients on a regular regularly? Opt for the growing time. Several things, by way of example fabric carrier bags, tend to be more suitable for selected periods than the others.The start of the summertime season is the perfect time for you to loss leader purses and handbags. Material carry bags are particularly treasured over the summer months weeks as they are really fantastic seaside bags. Nevertheless not necessarily convinced? Look over inside next the reason why purses are excellent summer time freebies:* Materials handbag bags are incredibly preferred during the entire the summer months many weeks. They will be utilised usually. Lots of people hold purses towards the seashore, to flea promotes and summertime features. http://www.hermesbeltsbirkinkellybag.co.uk/ If you ever give away bags at the beginning of the time of year, you'll be secured that they may certain you're seen simply by other individuals all time of year prolonged.* Canvas carry bags are hugely apparent. They can be of fine dimension which means your logo design may be of excellent sizing too. A more impressive custom logo is so visible in the greater mileage which enable it to, consequently, certain you're seen by simply more people.* Business logo bag bags have become resilient they're going to last longer. Thus, in case you hands available bags twelve months, it is possible to finish up promoting for many people summer season months. The way? Many people will bring your totes over one summer months time. Just about every time of year which the bag is now being utilized, it is promotion your company.As you are able to notify, there is also a large amount of explanations why tote bags are excellent summer months free gifts. These are very beneficial and durable which in turn ensures you will definately get your own moneys well worth from their website. And they are generally one of many most significant, most seen promo goods obtainable. Consequently, if you're still deciding which advertising circumstances to replace on the summer months free time products, maybe you should think about materials carrier bags.

Comment by stephanieg915 1 day ago

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-occasion-femme_282.html

www.canadagoosefemmehomme2016.fr/canada-goose-veste-femme_363.html

www.canadagoosefemmehomme2016.fr/achat-canada-goose-en-ligne_153.html

www.canadagoosefemmehomme2016.fr/canada-goose-france-boutique_218.html

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

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-pour-femme_475.html

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

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

www.canadagoosefemmehomme2016.fr/vetement-canada-goose_368.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-magasin-paris_280.html

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

www.canadagoosefemmehomme2016.fr/bomber-canada-goose_240.html

www.canadagoosefemmehomme2016.fr/veste-de-ski-canada-goose_162.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-camp-hoody_50.html

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

www.canadagoosefemmehomme2016.fr/vetement-goose-canada_345.html

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

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

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

Comment by sguerra376 5 hours ago

Your point of view

You must be signed in to comment.