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

Geolocate a given IP address

Terminal - Geolocate a given IP address
ip2loc() { wget -qO - www.ip2location.com/$1 | grep "<span id=\"dgLookup__ctl2_lblICountry\">" | sed 's/<[^>]*>//g; s/^[\t]*//; s/&quot;/"/g; s/</</g; s/>/>/g; s/&amp;/\&/g'; }
2010-10-13 00:19:35
User: bkuri
Functions: grep sed wget
0
Geolocate a given IP address

Grabs the ip2location site and removes everything but the span tag containing the country value. Place it inside your .bashrc or .bash_aliases file.

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives
curl ipinfo.io/<ipaddress>
geoiplookup <ipadress>
2010-10-13 09:19:17
User: houghi
2

GeoIP Needs to be installed. Can be done from some distro's or via MaxMind.com for free. There even is a free city database availabble. If the GeoLiteCity is downloaded and installed it will also find more information

geoiplookup -f /var/lib/GeoIP/GeoLiteCity.dat commandlinefu.com

GeoIP City Edition, Rev 1: US, NJ, Absecon, 08201, 39.420898, -74.497704, 504, 609

geoip() { lynx -dump "http://api.hostip.info/get_html.php?ip=$1&position=true"; }
0

Defines a function to geolocate a given IP address; if none supplied, will default to your external IP address.

Know a better way?

If you can do better, submit your command here.

What others think

you need to

apt-get install geoip-bin

for geoiplookup to work

Comment by rubo77 230 weeks and 1 day ago

Nappy bags are most notably created to maintain some sort of method to obtain clean up huggies diapers for ones child or perhaps child. Going for a newborn coupled on a short or long travel doesn't have to be a significant creation should you maintain bag loaded constantly while using important things. Those items that are required will change based on the grow older as well as from the kid. Ease and comfort in addition to attention although abroad are designed less complicated having a bag to hold the actual items.The main purpose of the bag is always to have diapers. Toddlers will go via a wide range of diapers is only a short time. Then of course you'll should http://www.hermesbeltsbirkinkellybag.co.uk/ carry a pot associated with pre-moistened baby wipes and keep skin thoroughly clean. A few mom and dad put a jar involving milk products as well as formulation to the bag, but this can establish heat command issues. Moms and dads might just have tested solution alongside in order that a mixture is usually easily geared up if your child is preparing to eat and drink. A change of garments and also jars of baby food items are other widespread items to invest the particular your own bag.Look pertaining to stitches that are supports strong attachments regarding bands as well as addresses. You don't need your bag to help break apart less than make use of. A quality bag last over the months of baby diaper toting and grow look nice.You can get bags that are various sizes. The dimensions probably will be determined by how much items you need to take with you on the travel. Seeing that babies get larger, those items they require are usually larger too. This bag will probably ought to mature together with your little one.The bag ought to be effortlessly washed. Spilled foodstuff, dust and dirt are not good items to get for the bag near your little one things. Whether the protect can be leather or perhaps man-made buckskin and could be wiped straight down with a humid textile or some other supplies, you ought to be able to clear the finish quickly and easily.The grips or perhaps hauling shoulder straps of one's carry bag needs to be solidly attached. Whether it's a slight catastrophe in the event the strap pulls reduce and spots the actual belongings in your bag onto the ground. Deciding on wider shoulder straps is often more comfortable in the event the bag can be more substantial than usual. Narrow connectors may possibly have a tendency to reduce your own neck.You might choose to decide if you aren't you need chambers inside the nappy bags you choose. Many bags are vast ope, others are manufactured with various purses along with spaces. There could be bottle holders around the external surface of the bags so that they do not leak on thoroughly clean huggies diapers or perhaps garments. You should opt for a bag having a end system for example a freezer.

Comment by stephanieg915 3 days ago

Whilst in the strategy of determining which often promotional items you will be offering, you may ponder whether you must go the regular path. By simply tradition, which means could even get discarded charm the concept people would like to get the normal promotional items, including writing instruments and also bags. This can be something that often leads one to the predicament specifically because these products are less costly as opposed to higher and more appealing electronic gadgets for instance Hardware recollection twigs. On the other hand, you will be astonished to be aware of of which pens in addition to bags even now maintain the interest individuals.Promotional writing instruments are certainly stuff that come in the market industry some time already. The truth is, it's commonly considered that if the reasoning behind offering products pertaining to campaign was developed, companies presently received markers inside their brains as the greatest options. This may be caused by the belief that this kind of items are inexpensive and should not end up http://www.hermesbeltsbirkinkellybag.co.uk/ being hefty within the finances of those who are intending to disperse most of these for free. Apart from this particular, writing instruments are quite valuable. These are used to produce just about everything, which explains why folks would not think twice to take these kind of.Promotional bags seemed to be very well liked options. For the people businesses that are incredibly a lot considering ensuring his or her models have emerged by means of more people rather than just those that acquired the corporate products, bags are indeed the very best selections. Whenever bags are usually carried about, business companies along with art logos usually are thus viewable and seen through more people. For that reason, your promoting component is definitely further improved, with a lot more customers becoming gotten to by the subliminal audio message of the brand brand name and identify. This is actually the main reason the reason why there are far more companies that still utilize these for offers as opposed to trying the revolutionary. It is rather crystal clear of which giving away advertising pens along with bags features a great advantage. Even though this can look like less exciting in comparison to other products that are definitely more technologically innovative, folks would never restrain their selves coming from actually obtaining these when these are in fact given at no cost. As these be cheaper, no doubt it is smart to however start using thise since your fishing lures; things which really would cause you to spend less on your finances and still supply you with the best results. As a result, your small business really would maximum benefit from the.With the benefits receiving by simply promo bags, there is certainly really zero satisfied answer why it is best to avoid it an option. Even so, while this stuff are usually cheap in addition to common, you shouldn't neglect the intense want that these have high-quality. Which means that it is best to uncover whether or not people that you're giving out are true best in the industry. Even though they're affordable isn't going to resulted in there would always be you should not make sure top quality. Individuals would never established this particular factor besides even if these products are free of charge.

Comment by stephanieg915 3 days ago

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

http://www.canadagoosefemmehomme2016.fr/manitoba-canada-goose_482.html

http://www.canadagoosefemmehomme2016.fr/site-canada-goose_352.html

http://www.canadagoosefemmehomme2016.fr/vrai-canada-goose-pas-cher_40.html

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

http://www.canadagoosefemmehomme2016.fr/parka-canada-goose_120.html

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

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose_330.html

http://www.canadagoosefemmehomme2016.fr/montebello-parka-canada-goose_287.html

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

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

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose_433.html

http://www.canadagoosefemmehomme2016.fr/boutique-canada-goose-paris_302.html

http://www.canadagoosefemmehomme2016.fr/veste-style-canada-goose_223.html

http://www.canadagoosefemmehomme2016.fr/palliser-canada-goose_261.html

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

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-homme_161.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-femme_305.html

Comment by sguerra376 1 day ago

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-grande-taille_92.html

www.canadagoosefemmehomme2016.fr/parka-trillium-canada-goose_333.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-femme-occasion_164.html

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

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

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

www.canadagoosefemmehomme2016.fr/montebello-canada-goose_148.html

www.canadagoosefemmehomme2016.fr/usine-canada-goose_85.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-3-fois_242.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-site-officiel_188.html

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-france-site-officiel_307.html

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

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

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

www.canadagoosefemmehomme2016.fr/parka-montebello-canada-goose_379.html

www.canadagoosefemmehomme2016.fr/manteau-type-canada-goose_369.html

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

Comment by sguerra376 15 hours ago

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

www.canadagoosefemmehomme2016.fr/goose-canada_169.html

www.canadagoosefemmehomme2016.fr/borden-canada-goose_442.html

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

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

www.canadagoosefemmehomme2016.fr/langford-canada-goose_290.html

www.canadagoosefemmehomme2016.fr/canada-goose-grise-femme_269.html

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

www.canadagoosefemmehomme2016.fr/gants-canada-goose_312.html

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

www.canadagoosefemmehomme2016.fr/parka-canada-goose_120.html

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

www.canadagoosefemmehomme2016.fr/acheter-canada-goose-pas-cher_124.html

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

www.canadagoosefemmehomme2016.fr/logo-canada-goose_138.html

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

www.canadagoosefemmehomme2016.fr/canada-gooser_220.html

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

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

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-ou-parajumpers_414.html

Comment by sguerra376 7 hours ago

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-femme_305.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-trillium_201.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-taille-grand-ou-petit_112.html

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

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

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

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose-femme-pas-cher_472.html

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

http://www.canadagoosefemmehomme2016.fr/constable-canada-goose_67.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-bomber-chilliwack_119.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-site-officiel_57.html

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

http://www.canadagoosefemmehomme2016.fr/bonnet-canada-goose_289.html

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-pour-enfant_217.html

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

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

http://www.canadagoosefemmehomme2016.fr/boutique-en-ligne-canada-goose_131.html

Comment by sguerra376 7 hours ago

Your point of view

You must be signed in to comment.