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

Watch Network Service Activity in Real-time

Terminal - Watch Network Service Activity in Real-time
lsof -i
2009-04-25 14:24:04
User: hank
90
Watch Network Service Activity in Real-time

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives
lsof -i
2009-06-30 22:36:00
13

I prefer to use this and not the -n variety, so I get DNS-resolved hostnames. Nice when I'm trying to figure out who's got that port open.

netstat -ntauple

Know a better way?

If you can do better, submit your command here.

What others think

try iptraf. lsof -i is a one time deal. real-time would imply that you could see network activity as it happens in a continuous manner. iptraf is a basic utility that lets you do just that.

Comment by linuxrawkstar 417 weeks and 1 day ago

Thanks - iptraf is pretty effin cool!

Comment by hank 417 weeks and 1 day ago

To make it keep running until you hit ctrl-c:

lsof -i -r
Comment by unixmonkey3441 417 weeks and 1 day ago

awesome! I also like the output of the slightly longer:

watch "lsof -i"

Comment by icetek 416 weeks and 6 days ago

ugh.. noob alert, it should be:

watch "lsof -i"
Comment by icetek 416 weeks and 6 days ago

Same thing using ip address instead of dns hostname

lsof -Pan -i tcp -i udp

Comment by solarislackware 385 weeks and 5 days ago

lsof -Pni4

works for me

Comment by al3x 199 weeks and 4 days ago

Father's http://www.burberry-handbagsoutlet.net.co/ Day http://www.cheap-jerseys.cc/ is coming, kindergarten teacher http://www.beatsbydrdrephone.com/ asked http://bears.nfljersey.us.com/ the http://www.tommyhilfigerca.ca/ children http://www.longchamp.com.de/ to http://www.tomsshoes-outlet.us.com/ talk http://www.mcms-handbags.com/ about their father http://www.nike-rosherun.com.es/ to send http://longchamp.blackfriday.in.net/ what http://www.babylisspros.in.net/ kind http://www.burberry-outletonline.cc/ of http://www.ralph-laurenpolosoutlet.com/ gift. http://www.cheap-nike-shoes.net/ Every http://www.christianlouboutin.org.uk/ child http://www.nikeairmaxnc.co.uk/ will http://www.converses-outlet.com/ stand up http://www.oakleys.org.es/ and http://www.newoutletonlinemall.com/ finish, http://www.givenchy.in.net/ the http://www.juicycoutureoutlet.net.co/ other children will http://www.bcbg-dresses.com/ be talking http://michaelkors.euro-us.net/ about. http://www.lacosteoutlet.us.com/ Some http://www.oakleysoutlet.it/ children said: http://www.pandoracharms-canada.ca/ "I http://mavericks.nba-jersey.com/ want http://www.jimmy-chooshoes.com/ to http://bengals.nfljersey.us.com/ send http://www.toms-shoe.us.com/ my http://www.jordanrelease-dates.us.com/ father http://www.louboutin.jp.net/ a http://www.ralphlauren-polos.com.co/ hand http://coach.blackfriday.in.net/ to http://www.ralphslaurenoutlet.us.com/ thank the card." http://www.hogan.com.de/ The http://www.ray-bans.net.co/ children http://www.dsquared2.us.com/ think http://www.barbour-jackets.us.com/ this http://76ers.nba-jersey.com/ is http://www.longchamp-handbagsoutlet.us.com/ a http://www.vans-shoes.net/ good http://www.adidasshoesca.ca/ idea. http://magic.nba-jersey.com/ Some http://nets.nba-jersey.com/ children http://www.omegarelojes.es/ said: http://www.soccer-shoesoutlet.com/ "I http://www.mbt-shoes.us.com/ want to http://www.mlb-jerseys.us.com/ give http://www.hollister-clothing.in.net/ my father http://www.cheapnhljerseys.us.com/ hammer http://www.longchamp-bags.us.com/ the http://www.ralphlaurens-outlet.co.uk/ shoulder, http://www.adidas-superstars.nl/ because http://coach-outlet.tumblr.com/ he http://www.swarovski-crystals.us.com/ was http://www.rolex-watches.us.com/ tired." The http://knicks.nba-jersey.com/ children are nodded, agreed. http://oakley.blackfriday.in.net/ The children http://49ers.nfljersey.us.com/ one http://www.bcbg-maxazria.ca/ by http://www.marc-jacobs.us.com/ one http://redskins.nfljersey.us.com/ said http://www.nikestore.us/ they http://www.oakley--sunglasses.com.au/ want http://www.cheap-rayban.com.co/ to http://www.oakleys.in.net/ send http://www.hollisters.us.com/ a gift, basically have all http://www.michael-kors.com.es/ the children and http://www.cheap-jerseys.mex.com/ teachers http://www.adidas-schuheonline.de/ agree. http://www.cheap-raybansoutlet.in.net/ Then http://broncos.nfljersey.us.com/ there http://www.canada-gooses.net/ was http://www.oakleys-outlet.in.net/ a http://www.armani-exchange.in.net/ little http://www.tory-burchoutlet.com.co/ boy http://www.kates-spade.com/ who http://www.coach-outlets.net.co/ did http://www.converse-shoes.net/ not http://www.cheapmichaelkors.us.org/ say http://www.mcmhandbags.com.co/ that http://ralphlauren.blackfriday.in.net/ he http://chargers.nfljersey.us.com/ stood http://wizards.nba-jersey.com/ up http://www.pulseraspandora.com.es/ and whispered: http://www.hollisteronlineshop.com.de/ "I http://www.michaelkors-canadaoutlet.ca/ want http://www.coach-outletonline.ca/ to http://www.nike-air-max.com.au/ send http://www.nba-jersey.com/ my http://www.jimmy-choosshoes.com/ father http://www.iphone-cases.in.net/ a http://www.truereligionjeans.net.co/ bunch http://www.coachfactory.shop/ of flowers." He http://www.polo-ralph-lauren.de/ finished, immediately http://www.nike-tnrequinpascher.fr/ have children http://www.beatsheadphone.in.net/ ridicule http://www.nikeair--max.fr/ him http://www.abercrombiehollister.nl/ said: "your http://www.versaceoutlet.us.com/ father http://www.ralph-laurenoutletonline.in.net/ is not http://www.burberryoutlet-sale.net/ a http://www.michaelkorsoutlet-online.ar.com/ girl, http://www.nike-airmax.us.com/ how http://www.soccers-shoes.net/ can http://www.cheap-rolex-watches.org.uk/ send http://www.christianlouboutin-shoes.ca/ You http://www.oakleys-2017.in.net/ want to http://www.nike-outlet.us.org/ be your father http://www.supra-shoes.org/ scolded? http://www.pradaoutlet.com.co/ "Finished, http://cowboys.nfljersey.us.com/ the http://www.tracksuits-store.com/ other children http://steelers.nfljersey.us.com/ are http://www.rayban-pas-cher.fr/ laughing up. http://celtics.nba-jersey.com/ In the http://www.rosheruns.us/ laughter http://www.calvin-kleins.in.net/ of http://www.burberry-handbagssale.com.co/ everyone, the http://www.michael-kors.net.co/ little boys http://www.michaelkors-bags.com.co/ sad http://www.nikefree5.net/ to red http://panthers.nfljersey.us.com/ eyes. At http://www.oakley-sunglasses.mex.com/ this http://rams.nfljersey.us.com/ time, http://www.juicycouture.com.co/ the teacher http://www.mk-com.com/ in http://www.cheap-jordans.net/ time to prevent the http://www.polos-outletstore.net/ children's ridicule, http://www.nike-roshe-run.de/ but http://www.timberlandbootsoutlet.us.com/ the http://www.ray-bansoutlet.in.net/ teacher http://www.canada-goosesjackets.com/ to http://www.michael-kors-taschen.com.de/ see http://www.tommy-hilfiger.in.net/ the eyes of the boys also http://cavaliers.nba-jersey.com/ do http://ravens.nfljersey.us.com/ not http://www.barbour-jacketsoutlet.net/ understand. http://www.nikeair-max.ca/ After http://www.nikeshoes.org.es/ school, http://thunder.nba-jersey.com/ the http://www.swarovski-online-shop.de/ little http://www.adidassuper-star.de/ boy's mother http://www.michaelkorsoutletonline.net.co/ to http://www.abercrombie-andfitchs.com/ pick him http://coach.euro-us.net/ up, http://www.oakleysunglasses2017.com/ the http://www.salomon-schuhe.com.de/ teacher http://www.designer-handbagsoutlet.us.com/ took the http://giants.nfljersey.us.com/ opportunity http://www.tory-burchsandals.in.net/ to his http://jazz.nba-jersey.com/ mother said http://browns.nfljersey.us.com/ something http://www.swarovskissale.co.uk/ happened today, http://www.poloralphlauren.cc/ and finally http://www.pradahandbags.net.co/ hope http://jets.nfljersey.us.com/ my mother http://www.rolexwatches-canada.ca/ to accompany http://www.oakleyoutlet.ar.com/ the http://www.iphone-cases.net/ child http://www.toms-shoes.net.co/ to http://heat.nba-jersey.com/ choose http://www.nikerosherun.us/ another better http://www.newbalancecanada.ca/ gift. http://www.the-northfaces.us.com/ Mother http://www.christianlouboutinoutlet.net.co/ listened to http://warriors.nba-jersey.com/ the http://patriots.nfljersey.us.com/ teacher's http://www.barbour-factory.com/ words, http://www.hollisters-canada.ca/ did not http://www.michael-kors-australia.com.au/ say http://www.beats-by-dre.com.co/ anything, http://www.mizuno-running.net/ just http://www.ralph-laurens.org.uk/ love http://www.pandorajewellery.com.au/ to http://www.cheapshoes.net.co/ touch http://bucks.nba-jersey.com/ the little http://www.omega-watches.com.co/ boy's head, with http://www.marc-jacobsonsale.com/ a little boy http://www.designer-handbags.cc/ to go http://www.nikeair-max.es/ home. http://www.philipp-plein.us.com/ Father http://www.nike-air-max.com.de/ 's http://www.nike-schoenen.co.nl/ Day, http://www.giuseppezanotti.com.co/ the http://www.michael-kors.cc/ children http://www.raybanssunglasses.in.net/ and their parents http://www.ed-hardy.us.com/ at http://www.nhl-jerseys.us.com/ home http://www.timberlands-paschere.fr/ to http://www.nike-skor.com.se/ spend, or to play outside, http://www.ralphs-laurens.co.uk/ a http://www.truereligion-outlet.com.co/ family happy. http://www.basketballshoes.com.co/ While http://www.pandorajewelry.top/ the http://www.hermesoutlet.shop/ little boys, http://www.burberry-outletcanada.ca/ holding http://suns.nba-jersey.com/ a http://www.burberry-outlets.org.uk/ bunch http://www.rolexwatchesforsale.us.com/ of personally http://www.nike-mercurial.in.net/ pick http://www.valentino-shoesoutlet.us.com/ the flowers, led http://www.christian-louboutins.in.net/ by the http://www.nike-rosheruns.nl/ mother http://www.nikefree-run.net/ came http://www.newbalance-outlet.org/ to http://www.airmax-90.org/ the http://www.salvatoreferragamo.in.net/ cemetery. http://www.hugo-bossoutlet.com/ Went to http://www.michaelkorsbags.us.org/ one of http://www.p90xworkout.in.net/ the tombstone before the http://www.nike-free-run.de/ little http://www.plein.in.net/ boys http://www.pandoras-charms.org.uk/ put the http://www.adidas.us.com/ flowers down, facing the http://www.adidas-shoes.cc/ tombstone on http://www.swarovski-canada.ca/ the http://www.mcmbackpacks.in.net/ photos, http://www.airjordans.us/ said: "Dad, http://hawks.nba-jersey.com/ Father's http://www.coachblackfriday.com/ Day happy." http://www.toryburchsale.com.co/ Having http://www.burberryoutlets.net.co/ said http://www.soft-ballbats.com/ that, http://www.asics-shoesoutlet.com/ the http://www.air-huaracheshoes.co.uk/ boys could not http://www.asicsoutlet.us.org/ help http://www.vans-shoes.co.uk/ but http://www.tommy-hilfiger.com.de/ rushed to http://seahawks.nfljersey.us.com/ the mother's http://www.longchamps.us.com/ arms http://www.timberland-boots.com.co/ crying. http://celine.blackfriday.in.net/ The http://www.nfljersey.us.com/ next http://www.ralphs-laurenpolos.com/ day, http://www.nikeshoesoutlet.org.uk/ the http://www.tommy-hilfiger-online.de/ teacher asked http://www.ferragamo.com.co/ the http://www.hollister-abercrombie.com.se/ children: http://www.nba-shoes.com/ "Do you http://www.ralph-laurenspolo.co.uk/ send http://www.nikefreeshoes-inc.co.uk/ the gift http://www.converse.com.de/ dad like?" http://www.chi-flatirons.us.com/ All http://www.christian-louboutinshoes.in.net/ the http://www.longchamp.com.co/ children http://www.burberryonlineshop.de/ replied http://www.tnf-jackets.us.com/ in http://pelicans.nba-jersey.com/ unison. http://www.michael-kors.shop/ At http://www.vibram-fivefingers.in.net/ this http://www.longchampoutlet.com.co/ time, http://www.burberry-outlets-online.co.uk/ a child http://www.michaelkors.so/ pointing http://www.tomsoutlet-online.net/ to the http://www.prada-shoes.com.co/ little boy said: "You http://www.polos-outlets.com/ lie, how can your father http://www.oakleys-frame.net/ like to spend ah. http://www.michaelkors-outletonline.cc/ And http://www.rayban-pascher.fr/ your http://www.michaelkors.com.se/ eyes http://www.ray-banssale.com/ red, http://www.oakleyssunglasses.in.net/ must http://www.handbagsoutlet.in.net/ be http://www.christianlouboutinshoesoutlet.org/ your http://www.celine-bags.org/ father http://rayban.blackfriday.in.net/ scolded cry." http://michaelkors.blackfriday.in.net/ The http://kings.nba-jersey.com/ teacher also http://www.michaeljordan.com.de/ said http://www.abercrombie-fitchs.com/ to http://www.prada.com.de/ the boys: Lying http://www.thomas-sabo.com.de/ is http://www.michael-korsbags.org.uk/ wrong, even http://www.nike-max.fr/ if http://www.coach-outlet.store/ your http://www.tommy-hilfigers.net/ father http://www.chiflatiron.net.co/ does http://www.cheap-baseballbats.us/ not http://www.michaelkors.co.nl/ like http://www.truereligions.net/ the http://www.hermes-bags.net/ gift you http://www.nike-huaraches.nl/ send, http://www.thenorthfacejackets.fr/ you http://www.michael-korsoutlet.cc/ can http://raiders.nfljersey.us.com/ not lie http://buccaneers.nfljersey.us.com/ ah. "Other children http://www.the-northfaces.net.co/ have http://www.montres-pascher.fr/ exposed the expression http://www.air-max.com.de/ of http://www.cheapjerseys.us.org/ accusations, http://www.bottega-venetas.cc/ and talking http://www.jordanretro.org/ about. http://www.ralph-laurenoutletonline.com/ Little boys http://www.replica-handbags.net.co/ stubbornly http://www.cheapjerseys.net.co/ do not http://www.swarovskijewelrys.in.net/ make http://www.katespades-outlet.in.net/ any excuse. http://www.cheap-michaelkors.in.net/ Soon http://www.michael-korsbags.co.uk/ after, the http://www.polos-ralphlauren.us.org/ teacher http://www.giuseppe-zanotti.net/ learned http://www.coachfactory.cc/ that the little http://chiefs.nfljersey.us.com/ boy's http://falcons.nfljersey.us.com/ father http://www.hollisterclothingstore.org/ died http://www.horlogesrolex.nl/ on a http://www.michael-kors-outlet.us.org/ year, and on http://lakers.nba-jersey.com/ Father's http://www.hermesbirkin-outlet.com/ Day, the http://www.coachoutlet-online.com.co/ little http://www.co-aol.com/ boy http://www.to-coachoutlet.com/ was http://colts.nfljersey.us.com/ going http://www.swarovski-australia.com.au/ to http://www.ralphlaurencanada.ca/ worship his http://www.nike-air-max.com.se/ father. http://www.ray-banssunglasses.co.uk/ Children http://www.burberryoutlet-sale.com.co/ are http://www.hollister-clothingstore.com/ not http://hornets.nba-jersey.com/ clear on, still http://www.nikefree-run.org.uk/ laughing at http://www.ok-em.com/ the http://www.raybanoutlet.ca/ little http://www.the-northface.ca/ boys like http://www.puma-shoesoutlet.com/ to lie, http://www.cheap-michaelkors.com/ that http://www.toms-outlet.net/ his http://www.rolex-watches.net.co/ father http://www.timberlandshoes.net.co/ is http://www.adidasshoes.org.es/ a girl. The little http://www.dsquared2.in.net/ boys http://www.tory-burch.us.org/ never http://www.nike-air-force.de/ admit, http://www.nfl-jersey.us.org/ do http://www.ralphlauren-au.com/ not http://www.christianlouboutinshoes.jp.net/ refute, silently http://www.oakleysunglasses-canada.ca/ bear, http://www.oakleys2017.com/ is http://texans.nfljersey.us.com/ not http://nuggets.nba-jersey.com/ willing to http://www.coach-factory.in.net/ tell http://www.sunglasses-outlet.net/ you that http://www.rosherun.co.uk/ they http://www.burberry-outletstore.net/ have http://www.abercrombiefitchs.cc/ no father. http://www.nikestore.com.de/ The http://azcardinals.nfljersey.us.com/ teacher http://clippers.nba-jersey.com/ knew http://www.barbours.us.com/ that the http://bulls.nba-jersey.com/ little http://www.poloralphlaurenoutlet.net.co/ boy http://www.tommy-hilfiger.co.nl/ was http://www.new-balance-schuhe.de/ trying http://www.newbalance-shoes.org/ to http://www.toms-outlets.us.com/ hide, http://www.cheap-thomassabos.co.uk/ did http://timberwolves.nba-jersey.com/ not http://www.raybans-outlet.com.co/ tell http://www.outlet-burberry.net.co/ the truth, but http://www.nikeshoes-outlet.com/ to http://www.mk-outletonline.us/ prevent http://www.truereligion-outlet.us.org/ the http://www.true-religion.com.co/ children http://www.reebok.com.de/ continue http://vikings.nfljersey.us.com/ to http://www.vans-schuhe.com.de/ laugh http://www.puma-shoes.de/ at http://www.raybans.org.es/ him, http://www.oakley-outlet.net.co/ but http://coachoutlet.euro-us.net/ the effect http://www.abercrombie-andfitch.ca/ is http://www.tommyhilfiger.net.co/ minimal. http://www.woolrich-clearance.com/ A http://www.barbour.in.net/ lot http://www.ferragamoshoes.in.net/ of http://www.rayban-sunglasses.co/ things http://www.raybans-outlet.it/ are http://www.the-northfacejackets.net.co/ not http://spurs.nba-jersey.com/ seeing http://www.zxcoachoutlet.com/ is http://www.nike-shoes.dk/ real, http://www.raybans-outlet.cc/ and http://www.kate-spades.com.co/ we http://grizzlies.nba-jersey.com/ often http://www.bottega-veneta.in.net/ only http://titans.nfljersey.us.com/ believe http://www.rayban.com.de/ that http://www.ray-bans.co.uk/ they http://www.nike-shoescanada.ca/ see, http://www.nike-factorys.us/ hear, http://www.mcm-bags.us.org/ to improper http://www.underarmour.us.com/ judgment, http://www.toms--outlet.com.co/ put all http://www.burberrys-bags.net.co/ kinds http://www.ray-bans-sunglasses.net/ of malicious http://www.omegawatches.in.net/ speculation http://www.michael-korshandbags.us.org/ on http://www.prada-handbags.net.co/ others, http://www.cheapreplica-watches.in.net/ even http://rockets.nba-jersey.com/ with a bad http://www.jordan-shoes.com.co/ attitude http://www.air-huarache.co.uk/ towards http://pacers.nba-jersey.com/ others. We http://www.air-maxschoenen.nl/ think that http://www.converse.net.co/ their http://www.fendi-outlet.in.net/ views http://www.beatsbydre.com.co/ are http://www.pandora.com.de/ correct, in http://www.montblancpens-sale.com/ fact, http://jaguars.nfljersey.us.com/ we are http://www.burberry-bags.net/ likely to http://www.abercrombie-and-fitch.us.com/ be http://eagles.nfljersey.us.com/ only http://www.oakleys-sunglasses.in.net/ blinded http://www.wedding-dresses.cc/ by http://www.the-northface.com.co/ some http://pistons.nba-jersey.com/ appearance. Do http://raptors.nba-jersey.com/ not http://www.the-north-face.org.uk/ jump http://saints.nfljersey.us.com/ to http://www.toms-shoesoutlet.us/ conclusions, http://www.rayban.co.nl/ see http://www.michaelkorsoutlet.ar.com/ is http://www.true-religions.com/ not http://packers.nfljersey.us.com/ necessarily http://www.thenorthface.com.de/ the http://trailblazers.nba-jersey.com/ truth of http://www.nike-schuhe.com.de/ all. A http://www.long-champoutlet.com/ little http://www.katespadeoutlet.gb.net/ boy http://lions.nfljersey.us.com/ wants http://www.oakley-outletonline.com.co/ to http://www.oakleyoutlet.fr/ send http://www.airyeezy.us.com/ his father http://www.ralphlaurenonlineshop.de/ a http://www.newbalanceshoes.com.es/ bunch of http://www.levisjeans.com.co/ flowers http://www.scarpe-hoganoutlets.it/ on http://www.cheapoakleyss.com/ his http://www.oakley.com.de/ father's http://www.coach-outletonline.net.co/ day, http://www.north-face.com.co/ no http://www.uhren-shop.com.de/ matter http://bills.nfljersey.us.com/ what http://www.adidas.com.se/ his http://www.chrome-hearts.in.net/ reason http://www.lauren-ralphsoutlet.co.uk/ is, http://www.coach-factoryoutlet.net.co/ no one http://www.retro-jordans.com/ is qualified http://www.womenclothes.in.net/ to http://www.airmax-2015.org/ laugh http://www.instylers.us.org/ at a child's http://www.mcm-handbags.org/ father's http://www.cheap-mlbjerseys.us.com/ mind.

http://dolphins.nfljersey.us.com/

Comment by whn 6 weeks ago

Your point of view

You must be signed in to comment.