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.

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:



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!

Top Tags



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

A very simple and useful stopwatch

Terminal - A very simple and useful stopwatch
time read (ctrl-d to stop)
2009-03-20 22:50:06
User: mrttlemonde
Functions: read time
A very simple and useful stopwatch

time read -sn1 (s:silent, n:number of characters. Press any character to stop)


There are 2 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Neat. Though, in Z-shell, it seems that 'time' needs to be redirected, or it doesn't work.

time > read
Comment by dnavarre 409 weeks ago

Correction: my comment should have read

time > /dev/nul

Or similar. Obviously, redirecting to a file will create an empty/garbage file.

Comment by dnavarre 408 weeks and 6 days ago

Note that the text in brackets is not part of the command. Also, ENTER works as well as Ctrl-D.

Comment by ar 408 weeks and 6 days ago


Comment by point_to_null 408 weeks and 6 days ago

also does the same thing (with ctrl+d):

time cat
Comment by garbage 408 weeks and 6 days ago


time is a bash builtin but some OSes have their own time commands.

Comment by grep 408 weeks and 5 days ago


You are rigth. Was a mistake

Comment by point_to_null 408 weeks and 5 days ago

the command time read -sn1 is better to stop it (by pressing any character...)

Comment by mrttlemonde 396 weeks and 5 days ago

This one gives lap times on key presses and stops and gives a total when you press s

total=0;nl=$'\n';key=go; while [[ $key != 's' ]]; do result=$( (time read -sn1; echo "$REPLY") 2>&1 );result=${result/$nl/ };key=${result#* };lap=${result% *}; thou=${lap#0};thou=${thou/.};let total+=$thou;echo "Lap $lap"; done; echo "Total ${total:0:${#total} - 3}.${total: -3:3}"
Comment by dennisw 396 weeks and 1 day ago

Oops, I forgot to add this at the beginning of the line:


And this at the end:

Comment by dennisw 396 weeks and 1 day ago

Oops again! (why can't we edit these comments?) There should have been a semicolon right before the unset.

Comment by dennisw 396 weeks and 1 day ago

Fixed a problem with leading zeros on very small intervals:

shopt -s extglob;TIMEFORMAT=%E;total=0;nl=$'\n';key=go; while [[ $key != 's' ]]; do result=$( (time read -sn1; echo "$REPLY") 2>&1 ); result=${result/$nl/ }; key=${result#* }; lap=${result% *}; thou=${lap/.}; thou=${thou/#+(0)}; let total+=$thou; echo "Lap $lap"; done; echo "Total ${total:0:${#total} - 3}.${total: -3:3}"; unset TIMEFORMAT
Comment by dennisw 396 weeks and 1 day ago

In zsh you need to do:

time ( read )

Comment by xawl 318 weeks and 4 days ago

Since time is meant to monitor, you can monitor programs and bash scripts. I had a boss who was a real demon about this.

Comment by tevans 164 weeks and 3 days ago

Gone are the days, as soon as hands bags were utilized simply for carrying funds or maybe travel luggage. Today, ladies handbags are getting to be a fundamental part of girls attire. Developer buckskin handbags give a warm look and sophistication with a females overall look. A mix of competence along with sophisticated style, luxury custom made handbags come up with a female look stylish and also knowledgeable.There are females leather handbags for each and every disposition and event. Anybody can find the custom made handbag with regard to official occasions similar to conference meetings, business dinners along with get-togethers, along with day-to-day place of work to produce a impressive perception with versions fellow workers and company consumers. These days, individuals assess someone simply by his/her looks, means of attire, and also the fashion accessories that he is having. An artist leather handbag by simply, Parada,, Religious Dior, Burberry, or another major style brand is needed a person affect the correct guitar chord.There are usually custom females buckskin handbags intended for special events like marriages, events, and also, casual get-togethers, lunches, and also golf balls along with prom celebrations. What ever turn out to be will need and qualification, you could chose the women leather handbag to complement ones dress and style.However, when selecting women natural leather handbags pertaining to proper as well as relaxed purpose, it really is vital to keep several essential things in your mind, for example the excellence of the bag, it is genuineness, and cost. Though, luxury designer handbags by means of,,, Versace, along with other world-renowned manner brand names have the top, there are numerous whom offer inexpensive copies from the otherwise pricey handbags. Thus, you should definitely purchase the custom made ladies handbags from your trusted provider.Also, carry out shop around when selecting gals leather-based handbags. It's the the easy way reassure yourself of legitimate buckskin handbags in practical charges.If you might be thinking where you can get good quality custom made women handbags with cost-effective price points, you might get on obtenir.web.dans Your website is a member of a real provider connected with custom made high end equipment, including girls natural leather handbags, check out feet wedge sneakers, bag, clutch system, and also other fashion accessories by means of Celine, Private coach, Marc Jacobs,, Kate Spade,, Versace, Designer, Cloe, and lots of other high-end designer makes.Each object on offer at obtenir.com.dans continues to be in person found through specialists through globally, and is also checked out minutely to deliver legitimate plus the finest quality luxurious fashion accessories for you to buyers. The web site also offers in depth points and images of the women synthetic leather handbags it has in store.So, won't appear even more. Simply just look at the web site today, and buy ones much-loved luxurious designer handbag to help http://www.hermesbeltsbirkinkellybag.co.uk/ stylise by yourself!

Comment by stephanieg915 4 days ago

Ladies are unable to fall out of your house devoid of carrying a new bag. Unlike adult men, girls have to carry their own bags continuously. It is extremely clear as to why they must take bags. Within a womans bag, you're able to see make-up, toiletries and other particular things. Where ever they travel, they may definitely carry all of these items. Apart through the functional by using any bag, it is also regarded a way product. The sort of bag that you're going to work with will likely replicate your own trend design. In picking the best bag, you don't need to be able to put in plenty of hard work just to pick the bad that would satisfy your design. There are various bags online.Choose the proper Bag pertaining to YouAlthough you should consider your fashion design in buying bags, you have to to come up with the application of the particular bag. Can easily your bag maintain numerous objects inside? Will it be gentle or too much to carry? Should it look nice? You will find just some of your inquiries that you have to inquire. But for anyone who is the type of person who can not walk out of the property devoid of hauling the important goods as well as other personal stuff, you need to have pleasant leather handbags. With this sort of bag does not have for being enormous and ponderous. You'll find type leather-based handbags that are on offer in the online market.Purchase Wonderful Bags OnlineJust such as different style stuff like clothes and shoes, it really is much easier to acquire bags. Once you search for a nice bag, you don't have to manage way too many details unlike items. Depending on the pictures placed by simply on the internet sellers supplying womens handbags , it http://www.hermesbeltsbirkinkellybag.co.uk/ is possible to already visualize the actual picture of the item. In case you can not start to see the item, you can actually go for oneself if you would like buy it or you cannot. Place Your Order OnlineAfter seeking the bags which fits your current style and choice, you're absolutely no able to put your purchase online. You can just opt for the payment strategy furnished by the internet retail store. Commonly, most on-line offering web sites would offer a variety of payment methods in order that their customers will not come across any kind of difficulties searching for bags on the internet.You just have to wait for an proof from the web shop and you'll currently wait for a circumstances to possibly be sent directly to your chosen target. At this point, you can retail outlet without any hassle therefore you arrive at possess the very best bags that fit your lifestyle.

Comment by stephanieg915 4 days ago


Comment by sguerra376 3 days ago



























Comment by sguerra376 1 day ago

Your point of view

You must be signed in to comment.