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

find geographical location of an ip address

Terminal - find geographical location of an ip address
lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|sed -nr s/'^.*My IP address city: (.+)$/\1/p'
2009-07-22 16:14:56
User: antcore
Functions: sed
1
find geographical location of an ip address

a shorter version

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives
lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep address|egrep 'city|state|country'|awk '{print $3,$4,$5,$6,$7,$8}'|sed 's\ip address flag \\'|sed 's\My\\'
2009-02-25 17:16:56
User: leftyfb
Tags: bash
24

I save this to bin/iptrace and run "iptrace ipaddress" to get the Country, City and State of an ip address using the http://ipadress.com service.

I add the following to my script to get a tinyurl of the map as well:

URL=`lynx -dump http://www.ip-adress.com/ip_tracer/?QRY=$1|grep details|awk '{print $2}'`

lynx -dump http://tinyurl.com/create.php?url=$URL|grep tinyurl|grep "19. http"|awk '{print $2}'

function ip-where { wget -qO- -U Mozilla http://www.ip-adress.com/ip_tracer/$1 | html2text -nobs -style pretty | sed -n /^$1/,/^$/p;}
2012-10-22 21:39:53
User: tox2ik
Functions: sed wget
0

Tries to avoid the fragile nature of scrapers by looking for user-input in the output as opposed to markup or headers on the web site.

Know a better way?

If you can do better, submit your command here.

What others think

Why is this tagged #bash? Every bashism should be modded into obliviation.

Comment by artis 391 weeks and 5 days ago

My preferred language is en-US but the site ignores this setting and bases the language selection on my German IP - which breaks the script. It surely is the IP as after activating tor the site is in English. The TOR exit node IP suggests I reside somewhere near Oklahoma City.

Comment by penpen 390 weeks and 6 days ago

Everyone features alternative ideas at hand intended for anything They will be able to choose from making use of plastic-type material papers or perhaps a recycleable shopping bag There are usually natural bags which will be superior for the setting whilst several trash from landfillsJust because these usually are friendly to the environment recycleable bags doesn't mean that they're not provided rich in quality resources These bags have been considerably more resilient when compared with many of the disposable bags There are lots of available options with regard to buying bags tooThere a variety of ecologically bags that can be purchased in several businesses Customizing these bags is done often simply by corporations When they put their own title upon any type of merchandise similar to this it can make excellent marketing with regard to themUsing green bags should help the business and also the purchaser are more responsible about their very own setting They can help to eliminate what's going to be delivered to your our landfills as well These bags less difficult tougher compared to plastic-type or even papers looking bags which are coming from the businesses regarding free Whenever a person will be utilizing the friendly to the environment reusable bags they can use them commercially much more than simply looking They enables you to get stuff to your beachfront with your loved ones They can also be used to take stuff to your close friends home Everyone uses these individuals for many people unique thingsMost in the environmentally friendly bags can be acquired at wholesale prices Most companies are going to make use of the less costly costs when they can get a bigger amount to get it Everyone would rather possess a bag that may maintain what they are going to put in that without one breakingThere are numerous forms of eco-friendly bags which you can use Purchasing bags are not the sole sort of bag which is capable of being acquired There are many various kinds of bags men and women utilize each day It is vital to possess a variety of distinct styles and colors http://www.hermesbeltsbirkinkellybag.co.uk/ that exist for every corporation that will establishes to buy themWhenever some thing will be able to possibly be reprocessed it truly is pleasant to have something which is going to endure how it is gonna be in contact with Several items may be used inside green recycleable bags without having the concern of the stuff disposal on the bottom halfway to your vehicle There a variety of doable possibilities for all kinds of purchasing bag

Comment by stephanieg915 6 days ago

Seeking amazing and attractive Handbags? A lot of the women of all ages are generally browsing trend 1 week for the greatest variety of bags that suited on their personality. In case you are this style of ladies, than the post is done available for you because the following, I am going to discuss different kinds of handbags which are common inside 2013.Clutch: A classic design which finds it is distance to nearly all closet, this particular lady handbag occasions possesses proceeds its acceptance within clutch system Consuela Handbags. New and fascinating little bit of handbag is a superb function by manufacturers which defeat the joy of gadgets together with your fashionista. One can find number of style in addition to awesome colorings within the clutch i465 that will certainly improve your over-all type. Bowling bags: Bowling bags are another popular trend persists this year. Style week has witnessed most of them on-screen on track which consists of sq and sturdy; it gives all of them an authentic seasoned hanging around of favor. For anyone seeking to carry these kinds of bags in her own outfits, expert dress is an ideal complement. Tie up this bag with a stylish go well with in addition to heels smaller terrace ideal for working ladies. In any other case, provide it with a tad bit more everyday, using tight jeans plus a casual jacket or perhaps a basic blouse as well as opaque nylons.Slouch handbags: Stoop bags, yet another well-liked development, which are superb for those everyday wear. Large teardrop means it can be normally go garments, whilst their particular significant dimensions causes it to become the perfect course * that matches it is stylish glimpse together with useful vantages. Stoop Consuela Handbags are located inside cells plus the corresponding models to match the stylish models and also put in a true feeling of course for the bring. These are typically good alternatives for modern women who possess a great deal of items with regard to each day wear, and can be suited for the shoulder joint or maybe moved manually ,, determined by requirements.Colour movements: Remember, the colors have been different with regards to styles within handbags Trend Week this current year as well as everything from the conventional black color along with unclothed fast as well as http://www.hermesbeltsbirkinkellybag.co.uk/ striking paper prints were being witnessed about the course. For the people trying to find something that will always be in vogue through out the season, african american is obviously an excellent choice : a bit out of the ordinary. Try out adorning fashion, selecting a african american Consuela Handbags with some extra add-ons or designs. This is a great way to provide a little type together with your glimpse, but do not get carried away from a comfortable zone. Higher than presented are a handful of wonderful sorts of handbags which thriving the form marketplace. In order to prefer to purchase such an example bag after that pay a visit to juliensuvalde.internet to view the gathering.

Comment by stephanieg915 6 days ago

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

http://www.canadagoosefemmehomme2016.fr/kensington-parka-canada-goose_257.html

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

http://www.canadagoosefemmehomme2016.fr/parka-goose-canada_46.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

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

http://www.canadagoosefemmehomme2016.fr/survetement-canada-goose_356.html

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/vetement-goose-canada_345.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-magasin-paris_280.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-champs-elysees_360.html

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

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

http://www.canadagoosefemmehomme2016.fr/mystique-parka-canada-goose_229.html

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

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

http://www.canadagoosefemmehomme2016.fr/pas-cher-canadian-goose_219.html

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

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

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

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

Comment by sguerra376 3 days ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-langford-parka_444.html

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

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-pbi-chilliwack-bomber_73.html

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

http://www.canadagoosefemmehomme2016.fr/ou-acheter-canada-goose-en-france_308.html

http://www.canadagoosefemmehomme2016.fr/magasin-canada-goose-paris_39.html

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

http://www.canadagoosefemmehomme2016.fr/site-officiel-canada-goose_432.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-new-york-prix_159.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-suisse-prix_276.html

http://www.canadagoosefemmehomme2016.fr/rideau-canada-goose_303.html

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

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

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/parka-femme-canada-goose_336.html

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

http://www.canadagoosefemmehomme2016.fr/blouson-canada-goose-femme_143.html

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

Comment by sguerra376 3 days ago

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

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

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

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-new-york_396.html

www.canadagoosefemmehomme2016.fr/canada-goose-longue-homme_301.html

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

www.canadagoosefemmehomme2016.fr/bomber-canada-goose_240.html

www.canadagoosefemmehomme2016.fr/canada-goose-victoria-pas-cher_211.html

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

www.canadagoosefemmehomme2016.fr/ecusson-canada-goose_168.html

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

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-homme-prix_243.html

www.canadagoosefemmehomme2016.fr/canada-goose-snow-mantra_209.html

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

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

www.canadagoosefemmehomme2016.fr/manteau-canada-goose-pas-cher_42.html

www.canadagoosefemmehomme2016.fr/soldes-canada-goose_137.html

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-occasion-femme_282.html

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

www.canadagoosefemmehomme2016.fr/parajumpers-ou-canada-goose_87.html

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

Comment by sguerra376 3 days ago

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

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

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

www.canadagoosefemmehomme2016.fr/selkirk-canada-goose_77.html

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

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

www.canadagoosefemmehomme2016.fr/tuque-canada-goose_439.html

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-chateau-pas-cher_173.html

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

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

www.canadagoosefemmehomme2016.fr

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

www.canadagoosefemmehomme2016.fr/casquette-canada-goose_134.html

www.canadagoosefemmehomme2016.fr/canada-goose-manteau-femme_178.html

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/rideau-canada-goose_303.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-chateau-parka_247.html

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

Comment by sguerra376 3 days ago

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/lodge-hoody-canada-goose_133.html

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

http://www.canadagoosefemmehomme2016.fr/acheter-une-canada-goose_177.html

http://www.canadagoosefemmehomme2016.fr/macmillan-canada-goose_270.html

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

http://www.canadagoosefemmehomme2016.fr/tuque-canada-goose_439.html

http://www.canadagoosefemmehomme2016.fr/parka-homme-canada-goose_84.html

http://www.canadagoosefemmehomme2016.fr/hommes-canadian-goose_102.html

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

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

http://www.canadagoosefemmehomme2016.fr/magasin-d-usine-canada-goose_331.html

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

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-solaris-parka_375.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-occasion-femme_282.html

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

http://www.canadagoosefemmehomme2016.fr/chilliwack-bomber-canada-goose_372.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-new-york-price_202.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

Comment by sguerra376 2 days ago

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

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

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

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

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/magasin-canada-goose-paris_39.html

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-borden-bomber_196.html

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-victoria-pas-cher_211.html

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

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

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

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

www.canadagoosefemmehomme2016.fr/le-bon-coin-canada-goose_157.html

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

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

www.canadagoosefemmehomme2016.fr/nouvelle-collection-canada-goose_451.html

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

Comment by sguerra376 2 days ago

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-victoria-pas-cher_211.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-solaris-parka_375.html

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-homme-parka_111.html

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

www.canadagoosefemmehomme2016.fr/doudoune-sans-manche-canada-goose_314.html

www.canadagoosefemmehomme2016.fr/blouson-canada-goose-homme_467.html

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

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

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

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

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

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

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

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

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

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

Comment by sguerra376 2 days ago

Your point of view

You must be signed in to comment.