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

Display the number of connections to a MySQL Database

Terminal - Display the number of connections to a MySQL Database
mysql -u root -p -BNe "select host,count(host) from processlist group by host;" information_schema
2011-12-22 10:35:23
User: flatcap
6
Display the number of connections to a MySQL Database

Count the number of active connections to a MySQL database.

The MySQL command "show processlist" gives a list of all the active clients.

However, by using the processlist table, in the information_schema database, we can sort and count the results within MySQL.

Alternatives

There are 9 alternatives - vote for the best!

Terminal - Alternatives
mysql -NBe 'show global status like "Threads_connected";' | cut -f2
mysql -u root -p -e"show processlist;"|awk '{print $3}'|awk -F":" '{print $1}'|sort|uniq -c
2011-12-22 05:37:36
User: prasadwani
Functions: awk uniq
Tags: mysql
0

This command will help you to find how many number of connection are made to given mysql and what are the different hosts connected to it with number of connection they are making.

mysql -u root -p -N -e"show processlist\G;" | egrep "Host\:" | awk -F: '{ print $2 }' | sort | uniq -c

Know a better way?

If you can do better, submit your command here.

What others think

Clothes marketer Jordans KORS (KORS) provides received the horse - a exclusively beneficial firm by having a well-liked brand. On the other hand particular capitalists really should problem normally the managing workforce.Nowadays, several producers generate fake artist objects. They will copy the fashion and design associated with legitimate builder totes, garments, skinny jeans, and also extras. They choose cost-effective and also regular supplies to reproduce builder tickets. Quite often, a replica product is undistinguishable coming from a genuine one particular. A number of designers have got been successful with generating replications . of thousand-dollar clothing as well as add-ons.Settlements currently have truly removed returning to involving the Oughout.Ersus. Two along with the The big apple Department to train, inside a deal that will undoubtedly change the Peck Fall Write-up Place of work in Reduce Long island right 400-seat class university. Your blog article place of work actually acquired with talks along with metropolis regulators to promote your house this particular previous summertime, right after putting your 75,800-square-foot framework from One Peck Get between Pearl along with Water pavement within the industry in the year time. On the other hand measures deadlocked as well as the proposed sale made, which authorities declare might guide lessen Diminished Manhattan's crammed businesses, made an appearance inside risk.People just like Brad Pitt enjoy their particular Mary Toyota glasses. Tom Frd can be a leading sunglasses brand and is also understood for the unrivaled and enhanced models. The emblem carries a amazing variety for all kinds of type of style of teen son that wants to show upwards just like his / her useful celeb. The actor-brad pitt is an additional style of a celeb of which suches seeing that modern sunglasses. Their favored manufacturer is actually Ray-Ban, which is realized for its superior solutions along with exceptional brand name reputation. For over Several several years, Ray-Ban has the fact is recently been a favorite model content label amidst individualities. Thus, pertaining to teenage guys, using the services of Ray-Bans assistances to get in touch top-notch and design.After you happen to be specific the site is an precise just one, an individual perhaps can invest in khaki hamilton enormous logo model signature bag. The site will definitely shift the products free of charge once the requested prices are made. You'll receive issues punctually. A few situations, you may even obtain decreased costs using a happy day time. Once the Handbags Website acquires your current dwelling, you could possibly prefer to hold people as equipment with the fashionable clothing. You are making likely to stay in your mind on a regular basis.You might also elect to get all those bags that could have got been with us over the stays and aren't consequently favored ever again. Business and also wholesale suppliers rate these phones transfer, and that means you profits http://www.hermesbeltsbirkinkellybag.co.uk/ of extra affordable prices immediately. It is a significantly better strategy for those who would like a bag for their personal utilization rather then individuals purchasing with regard to re-sale since from year bags could not provide seeing that quickly as you desire they can.If anyone mean to receive reasonably priced Bags, make use of the buying ticklers earlier mentioned. Between these individuals does indeed incorporate a superb selection of getting a replicate as an alternative versus the genuine factor. Even so, via a your thing, additional ideas may be important all of which will absolutely attain the particular bags you like at a price you can manage.Micael Kors seemed to be birthed with Your five Aug 09 with Prolonged Area New york town. He ended up being termed Karl Andersen Jr, named after his / her dad Karl Andesen. The mommy remarried while he had been Your five and then he ended up being supplied a choice to vary his / her brand. He or she made a decision to be known as Micheal Jesse Kors. Micheal Kors had become a household members label being a super star judge within the blockbuster television show Undertaking Driveway.

Comment by stephanieg915 1 week ago

Any Ancient greek Orthodox Chapel destroyed by means of dirt through the October. 11, 2002 enemy attacks can be suing the Port Power of recent You are able to in addition to On the internet services more than a unsuccessful offer in order to improve their property. Within the assert, market leaders with the Religious organization claim that this agency involved in arrogance, poor trust and fraudulent conduct if it withdrew inside Drive by negotiations spanning a 2009 restoring agreement, quoting too much calls for through the chapel.This magenta sweater appears fantastic when worn that has a set of dark-colored trousers. The actual abundant coloring is good for lightening up a darker winter months ensemble as well as the smooth made of wool makes it equally at ease along with cosy. It can easily always be split in excess of the majority of forms of prime for any definitely versatile section of winter clothing.A genuine person really should have plenty of favourite fragrance containers - for different scenarios, distinct period, year in addition to feeling. Of course, a great parfum is pricey. Sadly, parfum current market has numerous imitations today, and sometimes the high price tag -- is not a guarantee involving good quality. That's the reason you must decide on ones perfume with great care and buying it just in good stores.Mad Adult men isn't just any phenomona with AMC, the great vintage filter ties shown on the show have grown to be an important tendency with guys manner. The Crazy Adult males show on tv occurs in their early Fifties any time slender neckties were inside their hight. Now showmanship parties nightly are generally presenting the biggest man superstars adopting the trend and even modern day manufacturers are checking out the present pertaining to inspiration in classic jewelry. If perhaps anybody wants to make this happen basic style tendency then test acquiring legitimate vintage 50s or even Fifties lanky neckties.Michael Kors Handbags Wall socket designer watches are made having authentic individuals in brain and yes it shows of their extremely attainable appears to be. You http://www.hermesbeltsbirkinkellybag.co.uk/ may hardly ever go awry having a classy wristwatch : whether you are sporting the whole go well with or just some sort of jacket along with denims. It can be intended to be tasteful and complicated throughout virtually all scenarios.The enjoyment and adventurous form of each and every distinct 60 Thirty sneakers will make heads turn, and that is certainly about the technique Ce Ce Chin made them. The girl actually came out with her own brand of footwear in the 80 Something like 20 brand showing your ex progress to be a artist as well as show off some of her finest patterns.Timex has always been an identity that may be related to good quality trustworthy as well as long-lasting wristwatches. Because the Fifties Timex has become near the top of your index charts inside product sales in america out offering other models.When getting cologne on the machine, the duty-free acquire is important toward the particular permitting of items you are eligible in order to into your nation. Americans are permitted to go back using their international cruise ships with $800 in acquisitions (for each person). In the event you exceed which amount of money, you must declare it to traditions in fact it is entirely possible that you might be required to fork out work on the get back to your Ough.Ersus.

Comment by stephanieg915 1 week ago

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

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

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

http://www.canadagoosefemmehomme2016.fr/solaris-parka-canada-goose_110.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-homme_474.html

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/citadel-parka-canada-goose_62.html

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Comment by sguerra376 4 days ago

http://www.canadagoosefemmehomme2016.fr/doudoune-canadian-goose_205.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-��-paris_227.html

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-toronto-outlet_483.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

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

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

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

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/yorkville-canada-goose_463.html

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

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

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

http://www.canadagoosefemmehomme2016.fr/taille-canada-goose_79.html

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

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

Comment by sguerra376 3 days ago

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

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

www.canadagoosefemmehomme2016.fr/branta-canada-goose_271.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-noir-femme_346.html

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

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-pas-cher_310.html

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/veste-canada-goose-femme-pas-chere_357.html

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

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

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-parka-expedition-homme_355.html

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

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

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

www.canadagoosefemmehomme2016.fr/canada-goose-camp-hoody_50.html

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

Comment by sguerra376 3 days ago

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-paris_266.html

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

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

http://www.canadagoosefemmehomme2016.fr/prix-d-une-doudoune-canada-goose_390.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-mystique-femme_179.html

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

http://www.canadagoosefemmehomme2016.fr/acheter-canada-goose-montreal_351.html

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-modele-victoria_409.html

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

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

http://www.canadagoosefemmehomme2016.fr/avis-sur-canada-goose_334.html

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

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

http://www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-france_401.html

Comment by sguerra376 3 days ago

http://www.canadagoosefemmehomme2016.fr/boutique-canada-goose_378.html

http://www.canadagoosefemmehomme2016.fr/destockage-canada-goose_286.html

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

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

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

http://www.canadagoosefemmehomme2016.fr/huron-bomber-canada-goose_335.html

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

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/gilets-canada-goose_370.html

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

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

http://www.canadagoosefemmehomme2016.fr/doudoune-canadian-goose_205.html

http://www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-paris_266.html

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-homme-chilliwack_233.html

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

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

http://www.canadagoosefemmehomme2016.fr/homme-canadian-goose_180.html

Comment by sguerra376 2 days ago

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-montebello-femme_373.html

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

http://www.canadagoosefemmehomme2016.fr/ou-acheter-canada-goose_100.html

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

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

http://www.canadagoosefemmehomme2016.fr/heatherton-canada-goose_484.html

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/yukon-bomber-canada-goose_147.html

http://www.canadagoosefemmehomme2016.fr/chapeau-canada-goose_238.html

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

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

Comment by sguerra376 2 days ago

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

www.canadagoosefemmehomme2016.fr/revendeur-canada-goose_106.html

www.canadagoosefemmehomme2016.fr/prix-d-une-canada-goose_130.html

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

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

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

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

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

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

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

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

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

www.canadagoosefemmehomme2016.fr/chilliwack-canada-goose_485.html

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

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

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

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

www.canadagoosefemmehomme2016.fr/chaussure-canada-goose_230.html

www.canadagoosefemmehomme2016.fr/canada-goose-au-canada-prix_54.html

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

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

www.canadagoosefemmehomme2016.fr/gilet-canada-goose_185.html

www.canadagoosefemmehomme2016.fr/doudoune-goose-canada_292.html

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

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

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

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

Comment by sguerra376 2 days ago

Your point of view

You must be signed in to comment.