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

Get the time from NIST.GOV

Terminal - Get the time from NIST.GOV
cat </dev/tcp/time.nist.gov/13
2009-12-03 21:40:14
User: drewk
Functions: cat
8
Get the time from NIST.GOV

The format is JJJJJ YR-MO-DA HH:MM:SS TT L DUT1 msADV UTC(NIST) OTM

and is explained more fully here: http://tf.nist.gov/service/acts.htm

Alternatives

There are 3 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

I don't get it to work with bash. What are the prerequisites ?

Comment by CodSpirit 372 weeks and 3 days ago

CodSpirit: On some systems, such as Debian and Debian offshoots, net redirections aren't enabled in Bash. You can do the same thing with curl, wget, or nc, though:

curl -s time.nist.gov:13 nc time.nist.gov 13 wget -q -O- time.nist.gov:13
Comment by eightmillion 372 weeks and 3 days ago

You have to enable net-redirections when compiling bash to do it.

That doesn't work on debian derivated distros by default...

Comment by sputnick 372 weeks and 3 days ago

Works for me on Ubuntu and OS X. I do not have Debian...

Comment by drewk 372 weeks and 2 days ago

Indeed it is not enabled on Ubuntu 9.04

Thanks eightmillion for alternatives

Comment by CodSpirit 372 weeks and 2 days ago

To convert to local time, you can use the date command, thus the full command will be:

wget -q -O- time.nist.gov:13 | awk '{print $2,$3}' | grep -v "^ *$" | (read t; date "+%Y-%m-%d %H:%M:%S %Z" -d "$t +0000")

(if it needs explaining, we get the date portion, skip empty line, read into variable t, then use date to print in local time)

Comment by Uriqimadh 139 weeks and 2 days ago

Obtaining a check out definitely will quit tricky as there are a great deal of on-line outlets the venue these timepieces are sold. You may also put order inside their proper web site. These wristwatches may be findinged with trendy chrono kind both for both males and females plus throughout fashionable household leather rings along with new mother connected with pearl calls. With the recent model design a few of the most recent fashions tend to be additionally studded along with crystal including the particular jewelry factor nevertheless are generally popular to use own approach.Every observe is actually created to hand mirror the crucial spirit regarding Versace. Versace's using regarding cherished and trendy gems inside their watches and accessories usually are large associated with Versace style and design. The watch templates are likewise recognized by simply tidy wrinkles and conventional colors and styles for instance Greek frets plus the Medusa. Within these watches, classic performances pays your essence from the modern day planet, developing a noticeably modern-day and captivating fashion.Take bags are a handful of by far the most accommodating bags around. A budget Handbags members of the family men and women will not be unsusceptible that information. Your Totes Obvious Handbag is otherwise engaged selection for the autumn. The spectacular element hooking up to take bags is perhaps all the approval they could be useful for. One could sock aside many perform sensitive information folders, his or her Macbook in addition to a sweatshirt for your chilly nights. They provide a far more fashionable treatment method to having your laptop or computer all-around after that the standard notepad bags provided by people considerable pc companies.You may also select bags to utilize through particular times of year. Many girls which stick to style development trends definitely will work with lighter weight coloured bags through the summer and deeper hues with the the autumn months in addition to winter. The particular Tonne bag by is a advanced product or service made out of some sort of summer whitened buckskin. This kind of item features circular cables manages and a glenohumeral joint music group so you can take it 2 various techniques.When you have to have greater products, including fitness center clothing, magazines, seaside towels or maybe instructions, some sort of have bag will give you a good amount of method to dispatch your own products when you ought to obtain a place. If you want a bag to http://www.hermesbeltsbirkinkellybag.co.uk/ want towards the swimming, watertight soft choices readily accessible, besides a number of other personal easy-to-clean or maybe good quality materials. If you need a spacious bag to work with on your gymnasium travels, the actual Timbuk2 Scrunchie Bag is large satisfactory to secure your clothes as well as extras, whilst the Hadaki by simply Kalencom Cost-free Heart Carrier is definitely various colored and also flawlessly size to need towards the selection or perhaps park for an mid-day bar-b-que.Michael Kors Electrical socket On the web specializes in design fad and chic floor plans that can certainly fascination a modern day consumers. The watch series concentrate stylish as well as charming equip designer watches which may have usual characteristics having eye-catching appearances. Mind-blowing all-natural natural leather or even steel adjustable rate mortgage artists, mother-of-pearl contact supplies using, enjoys using quit designer watches along with spectacular metals are simply just a few of the substantial traits which might be displayed in ordeals.Michael Kors HandbagsChildren would be the small absolute favorites in the wedding event outfit and be entitled to eye-catching shoes. Stride Ceremony delivers innovative dress shoes and boots for kids which incorporate clasps in addition to support that defend their particular toes within unpredictable seaside sand. wedding dress sneakers for the kids really are a little much more bold along with suitable for older children.As if this directory site regarding components has not been fantastic satisfactory the market industry price tag on this bag can be $198.00. This kind of bag might service way up virtually any kind of almost autumn equinox apparel. Your list price on this bag additionally can make it pleasantly readily available for simply regarding anybody. Become advised, many of the Bags Carriers could build you again in relation to $3,500.

Comment by stephanieg915 6 days ago

www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-plusieurs-fois_152.html

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

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

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

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

www.canadagoosefemmehomme2016.fr/ou-acheter-une-doudoune-canada-goose_348.html

www.canadagoosefemmehomme2016.fr/acheter-doudoune-canada-goose_258.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-the-chateau_364.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber-femme_458.html

www.canadagoosefemmehomme2016.fr/pantalon-canada-goose_315.html

www.canadagoosefemmehomme2016.fr/blouson-canada-goose-pas-cher_78.html

www.canadagoosefemmehomme2016.fr/vetements-canada-goose_64.html

www.canadagoosefemmehomme2016.fr/marque-doudoune-canada-goose_74.html

www.canadagoosefemmehomme2016.fr/leboncoin-canada-goose_481.html

www.canadagoosefemmehomme2016.fr/canada-goose-pour-b��b��_146.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-femme-pas-cher_139.html

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

www.canadagoosefemmehomme2016.fr/heli-arctic-canada-goose_441.html

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-vs-pjs_443.html

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

Comment by sguerra376 3 days ago

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

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose-a-vendre_450.html

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

http://www.canadagoosefemmehomme2016.fr/parka-expedition-canada-goose_452.html

http://www.canadagoosefemmehomme2016.fr/doudoune-longue-canada-goose_447.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pour-b��b��_146.html

http://www.canadagoosefemmehomme2016.fr/forum-canada-goose_60.html

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

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

http://www.canadagoosefemmehomme2016.fr/

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-manteau-homme_256.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-printemps-haussmann_323.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-point-de-vente_371.html

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

http://www.canadagoosefemmehomme2016.fr/marque-doudoune-canada-goose_74.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-prix-canada_277.html

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-dawson-parka_374.html

http://www.canadagoosefemmehomme2016.fr/prix-doudoune-canada-goose_428.html

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

http://www.canadagoosefemmehomme2016.fr/prix-canada-goose-enfant_75.html

http://www.canadagoosefemmehomme2016.fr/vente-de-canada-goose_361.html

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-outlet-france_122.html

Comment by sguerra376 2 days ago

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

www.canadagoosefemmehomme2016.fr/prix-d-une-canada-goose-au-canada_175.html

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

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

www.canadagoosefemmehomme2016.fr/mystique-canada-goose_343.html

www.canadagoosefemmehomme2016.fr/manteau-femme-canada-goose_248.html

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/chateau-parka-canada-goose_225.html

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-france_142.html

www.canadagoosefemmehomme2016.fr/nouvelle-canada-goose_193.html

www.canadagoosefemmehomme2016.fr/point-de-vente-canada-goose_304.html

www.canadagoosefemmehomme2016.fr/canada-goose-taille-s_327.html

www.canadagoosefemmehomme2016.fr/resolute-canada-goose_116.html

www.canadagoosefemmehomme2016.fr/comment-reconnaitre-une-canada-goose_478.html

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

www.canadagoosefemmehomme2016.fr/skreslet-parka-canada-goose_469.html

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

www.canadagoosefemmehomme2016.fr/femme-canadian-goose_104.html

Comment by sguerra376 1 day ago

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-a-vendre_404.html

www.canadagoosefemmehomme2016.fr/canada-goose-en-suisse_89.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-enfant_337.html

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

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

www.canadagoosefemmehomme2016.fr/chateau-parka-canada-goose_225.html

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

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

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

www.canadagoosefemmehomme2016.fr/victoria-parka-canada-goose_338.html

www.canadagoosefemmehomme2016.fr/resolute-canada-goose_116.html

www.canadagoosefemmehomme2016.fr/canada-goose-taille-xs_224.html

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

www.canadagoosefemmehomme2016.fr/prix-canada-goose-new-york_215.html

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

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

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

www.canadagoosefemmehomme2016.fr/entrepot-canada-goose_158.html

www.canadagoosefemmehomme2016.fr/promo-canada-goose_263.html

Comment by sguerra376 1 day ago

Your point of view

You must be signed in to comment.