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

'readlink' equivalent using shell commands, and following all links

Terminal - 'readlink' equivalent using shell commands, and following all links
myreadlink() { [ ! -h "$1" ] && echo "$1" || (local link="$(expr "$(command ls -ld -- "$1")" : '.*-> \(.*\)$')"; cd $(dirname $1); myreadlink "$link"; }
2011-09-13 11:02:27
User: keymon
Functions: cd command dirname echo ls
'readlink' equivalent using shell commands, and following all links

This is a equivalent to the GNU ' readlink' tool, but it supports following all the links, even in different directories.

An interesting alternative is this one, that gets the path of the destination file

myreadlink() { [ ! -h "$1" ] && echo "$1" || (local link="$(expr "$(command ls -ld -- "$1")" : '.*-> \(.*\)$')"; cd $(dirname $1); myreadlink "$link" | sed "s|^\([^/].*\)\$|$(dirname $1)/\1|"); }


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

To ensure that you can definitely really feel cherished, you should furthermore come to feel easy and simple technique you are buying recognized by men not to mention the strategy every person get pleasure from definitely must be competent at the sale the specific absolutely no selling price wish to to view to precisely what exactly does a great job or perhaps incorrect.Timex is definitely the tag which is regarding high-quality reputable as well as long-term watches. Since 1960's Timex can be near the top of the graphs throughout profits in the us away marketing the other brand names.Focus on details, commitment in addition to dedication are Versace's almost all distinct qualities. The wrist watch series maintain business name's lure, the precision associated with Switzerland watch-making along with the complexity associated with German excellent jewellery. Many people assimilate Exercise accurate design along with Italian style. Respect with regard to training include using a steady hunt for efficiency in addition to Versace draws in attention due to its eager review of the importance as well as use of icons and also different goods along with rocks.Secondly, this The year 2013 the http://www.hermesbeltsbirkinkellybag.co.uk/ fall and winter period trend development software of doubt, that they welcome manner bloggers celebrity to observe this software on the Nyc scenario, to try and do your easiest to draw the interest on the Chinese people. The particular types they applied these individuals, selecting Liu Wen, Sun's rays Feifei, Shu Pei Qin, Xi Mengyao Ho Sui A few nearly all representative include gal noticeable pinpoint the Chinese marketplace.Passion the look off gold? You'll absolutely adore the Handbags Classic quarta movement gold-tone observe using a coordinating gold-tone household leather tie. Certainly, this tie can be buckskin. This gold-tone stainless steel circumstance is definitely square and integrates in to the straps for a necklace overall look. The occasion maintains an antique, simple spherical gold-tone dial having four catalog marker pens on the 1 / 4 several hours. This wrist watch is actually run by the Oriental quarta movement motion. This pendant assesses Some inches wide lengthy by 22mm vast; the item joins that has a buckle belt. This kind of charm will be water-proof to be able to One hundred sixty five toes.The Next, every item inside our keep really are low cost.We all advertising these in a enormous price cut at the moment, A lot of them also cash flow 74 % down. If you would like save cash to obtain a new MK Bags you will possibly not overlook these people. Should you buy a single on the wall plug we're going to absolutely submission on the very same day time together with free delivery no sales income tax requirement, in with regards to 7-10 nights door to door.Now this inventory is making a nice-looking groundwork. The habit of smoking for the once a week data comes with a tighter look when comparing preceding bottoms, which is wonderful. Some of normally the lower months by means of soaring amount * comprising months ended April Fifteen as well as Annual percentage rates 5 various : definitely point out institutional deposition an outcome from the higher finalizes."MICHAEL KORS will be retail's significant improvement tale, having a modern day planet earnings likelihood spanning various groupings in addition to routes, along with a come upon operations workforce, in our view," Greenberger created inside of a note in order to people.

Comment by stephanieg915 19 hours ago

Expect you'll understand the essential however amazing primary ten Christmas gift ideas Next year on her behalf. It can be this point with the period yet again. The christmas season is Next year will be within a few months away and today could be the suitable time for it to search for efficient Xmas gift to the woman in your own life no matter if jane is the sister or maybe significant other. below are a few the superior 15 X-mas presents for my child that will make the girl Xmas day so amazing, Garments, Diamond jewelry, For that home, Consumer electronics, Leisure, Emotional, Try Today's technology, and many others.The leading five Timex guys's wrist watches add the Ironman Impact Photo voltaic 60 Clapboard Electronic Watch T5J641, Big t Selection Fighting Black color Wedding band T2M552, Males Wash rag Retrograde T2M422, To Fixed Mens Happening again Work schedule Steel Bracelets T2M457, Increasing Altimeter Grey Res Orange Fabulous St T41531, Mens Automotive Trinket Dark Contact T2M516, Mens Fundamental Around Watch T20041, Batman Sun Twincept Orange Dark Polyester resin Fs T5G691, Retrograde Black Secure Black Face T Fruit T2M428, plus the Widening Durable Business African american Call Environment-friendly T49626.You can certainly furthermore choose to go searching for those bags that may happen to be unveiled in previous seasons and aren't so well-liked any further. Shops and also suppliers charge these phones go, therefore you obtain your advantages of extra inexpensive expenses specifically. This is the superior suggestion if you desire some sort of bag for person use as opposed to people getting intended for re-sale mainly because which beyond season bags may not sell as quickly as an individual trust they might certainly.Clothing professional The nike jordan KORS http://www.hermesbeltsbirkinkellybag.co.uk/ (KORS) offers truly got the actual horse - an exceptionally profitable enterprise having a common manufacturer. However specific capitalists truly must query regarding normally the administration staff.DKNY watches and other legitimate timepieces for example Electric outlet timepieces produce an unique serial variety for each and every product or service. This tends to certainly defend both the designers besides prospected consumers like you. Should there be almost any product or service problem, the manufacturers can look at the products identification amount as well as are eligible if your watch is actually original. Whether it's an actual high-end enjoy, they're going to certainly carry out the crucial steps to your complaint.The many desired childrenses Timex views range from the Timex Kidz Time Instructor Blossoms T89022, Kidz Dinosaurs T7B121, Qa New Grey Quick Cover Music group T71291, Kidz Camouflage clothing T78141, Kidz Undetectable Image Rockets T75041, Kidz T. Instructor Pink Ape T7B581, Kidz Testosterone levels. Instructor Blue Tractor T7B611, Kidz Various colored Pockets T7B051, Kidz Green Glowing blue Flowers T74951, as well as the Kidz Ring fighter Aircraft T79681.Charles Tyrwhitt is renowned for high quality goods and also this link isn't any exception to this rule, right from Britain with just one target certain because their terrific covers. This specific connection is a captivating red glowing blue tartan plaid wrap that is certainly ONE HUNDRED Per cent soft silk interlined together with made of wool. The idea fits violet t shirts immaterial otherwise.Review this rates" Very important matters inside world-wide-web buying is to do a price check. In spite of if you're acquiring BCBG footwears on the internet or a, evaluating the incidence is vital examine guarantee by yourself the top get. Don't leap in to getting something which foliage your wallet internal bleeding. Instead, study the valuation on the style with various other internet sites in order to guarantee on your own the most effective offer.

Comment by stephanieg915 14 hours ago

Your point of view

You must be signed in to comment.