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

keep trying a command until it is successful

Terminal - keep trying a command until it is successful
jkhgkjh; until [[ $? -eq 0 ]]; do YOURCOMMAND; done
2014-04-11 08:19:15
User: moiefu
-2
keep trying a command until it is successful

You want bash to keep running the command until it is successful (until the exit code is 0). Give a dummy command, which sets the exit code to 1 then keep running your command until it exits cleanly

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives
until !!; do :; done
!!; while [ $? -ne 0 ]; do !!; done
2013-04-27 20:47:49
User: MagisterQuis
9

Executes the previously-run command constantly until it returns 0 (success). Put a

until !!; do done
2013-04-29 02:30:28
User: tremby
1

Repeat the previously used command (!!) until it exits with a success code (0). To put a delay between attempts you could do something like

until !!; do sleep 5; done

to wait 5 seconds after each attempt.

Know a better way?

If you can do better, submit your command here.

What others think

please instead of 'jkhgkjh' use 'false'

Comment by wejn 144 weeks and 4 days ago

If you are planning to accumulate reasonably priced Timepieces, utilize the acquiring tips over. One of these does demand a sensible replacement of receiving a replica as opposed to the real thing. On the other hand, fitness machine . your current style, the countless additional methods are generally alternatively useful and can absolutely ensure you get this bags you like at a rate you might buy.Jacquetta Wheeler applied the grapes and dark made dolman adjustment clothing, african american Mikaela shoes in addition to dark clutch i465 all in the Web page Fall months The year 2013 series.Michael Kors Web site bags could possibly be found in position including Saks Fifthly Possibility, Bergdorf Goodman, Macy's as well as other high-end electrical outlet outlet. Their bags decline under the luxurious item classification and so are recognize for clean in addition to clever glimpse.Check out of the Merchandise handily accessible : Athletic shoes could be found in limitless styles, consequently, check out the assortment of series the outlet offers as well as appraise the rates since available in the company brands web page. When the web page possesses a number of actually unheard of variety available for you in store, that you've got in fact not really observed somewhere else, you would possibly place your cash on the idea.Bleecker Street is the house of countless of fashion trend's major labels - Marc Jacobs, Ralph Lauren, Lulu Guinness. That Dec, definitely will add his / her label on the prominent Western world Neighborhood reel mentioned previously through WWD on-line. Kors will definitely amount a single,475 square-foot way of life retail outlet presenting add-ons as well as other stuff in the brand name. The actual attire store will be found from Olive & & Bette's earlier location at 384 Bleecker Path.Balenciaga bags a variety of of the extremely tried to uncover right after bags in the world. Balenciaga purses and handbags are created using a man or woman of the very revered developers within the market, Cristobal Balenciaga. They formulated the field of Balenciaga within the incredibly early on 1900s with San Sebastian, Italy and also afterwards pay off throughout the world after that. With the the middle of 1900s, Balenciaga been on truth distributed on the essential urban centers of The city in addition to Spain's capital and to be able to Venice. Using its sought after heritage, Balenciaga continuouslies develop remarkable elegant purses these days.The Casio opinions the thing is currently just weren't commenced by a check out as well as a http://www.hermesbeltsbirkinkellybag.co.uk/ accessories company and that is actually amazing with the excellent in addition to exceptional designs of Casio places the truth is currently. In 1946, Casio had been setup using Tadio Kashio as the creator in this realistic company. All through these times, Okazaki, japan was a student in the middle of Your second earth challenge, the particular situation economically connected with Asia similar to other sorts of Eu places seemed to be harsh. Right at that moment as soon as Mr. Kashio started off the firm, he or she is at about turning it into huge anf the husband would simply that while using progress on the yubiwa direction.Today, a wristwatch is just not just something make use of to share with time. Basically, an eye fixed is undoubtedly an increase of one self. You could discover just about all kind of timepieces to share your own style, your form, or even equally a watch catcher using great bargains regarding jewels. The problem is should you acquire net as well as with the shopping mall?

Comment by stephanieg915 1 day ago

Nappy bags are usually first of all intended to maintain some sort of way to obtain clear nappies to your newborn or even young child. Getting a little one along over a short or long make your way must not be a significant manufacturing if you keep your bag stuffed at all times with all the crucial objects. The items that are required will change based on the age group as well as with the baby. Ease along with attention while overseas are created less complicated that has a bag to cart your items.The main purpose of your bag is to bring pampers diapers. Little ones can be by way of a large amount of baby diapers is just a small amount of time. You will also should use a pot of pre-moistened infant baby wipes to keep the skin thoroughly clean. Some mom and dad place a bottle involving dairy or formulation into the bag, but this can make heat range control concerns. Parents may bring assessed system together so that a variety might be swiftly prepared if the baby is just about to eat and drink. An alteration of garments along with containers of child foods are other widespread items to devote the actual your current bag.Look for joints that happen to be stands for effective accessories with regard to shoulder straps or maybe addresses. You wouldn't want ones bag to falter less than work with. A good quality bag can last from the months of baby diaper toting and grow look great.You can obtain bags that are sizes. The size and style probably will rely on how much items you'll want to take with you on the journey. Since toddlers find more substantial, the things which they will need are usually more substantial as well. Your bag will likely have to increase with your little one.The bag ought to be quickly cleaned out. Poured meals, dust and dirt are certainly not good stuff to own about the bag near your baby goods. Regardless of if the deal with is leather-based or perhaps imitation buckskin and is easily wiped all the way down with a rainy cloth along with other products, you ought to be able to clear the surface quickly.The grips as well as holding bands within your carry bag needs to be solidly connected. Should it be a modest catastrophe when the tie drags free along with spills this contents of the bag on top of the terrain. Deciding on larger straps could be more comfortable to wear if your bag is definitely more http://www.hermesbeltsbirkinkellybag.co.uk/ substantial than usual. Narrow band could often reduce your own make.You may want to determine whether you aren't you need pockets in the baby diaper bags you choose. Several bags are extensive ope, other people constructed with some other pockets and also storage compartments. There could possibly be bottle of wine cases within the surface surface of the bags to make sure they will not trickle upon thoroughly clean huggies diapers or maybe garments. You ought to pick a bag that has a closing device like a zipper.

Comment by stephanieg915 1 day ago

Your point of view

You must be signed in to comment.