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

start a tunnel from some machine's port 80 to your local post 2001

Terminal - start a tunnel from some machine's port 80 to your local post 2001
ssh -N -L2001:localhost:80 somemachine
2009-02-05 09:13:23
Functions: ssh
221
start a tunnel from some machine's port 80 to your local post 2001

now you can acces the website by going to http://localhost:2001/

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

What are the caveats for this working?

Comment by DannoHung 414 weeks and 4 days ago

none, as far as i know. i use this to access a customers intraweb application.

this way the customer only needs to open up port 22 (ssh) in the firewall for just one ip address of some machine in your local lan (your hub machine).

this way you can hop for your laptop to that local machine to the customers machine. as secure as it get's while still being relatively easy to use. no tokenstuff needed (i hate tokens and the 'supposed better' security).

Comment by mischamolhoek 414 weeks and 3 days ago

Some web applications will get upset if you supply a port when they're not expecting it, or will break if they expect to be able to do redirects or URL rewriting.

But in general, this will work. Everyone in my company uses this every single day!

Comment by semanticist 412 weeks and 5 days ago
ssh -D 9000 somemachine

Sets up local port 9000 as a SOCKS 5 proxy via somemachine

Comment by rae 412 weeks and 4 days ago

a little more details, for example, in the case of an email client on a laptop, pointing to localhost:8025 for SMTP services, and localhost:8110 for POP3 services associated with a Comcast account, w/out traversing ?foreign? networks with clear text credentials, looks like:

ssh -f -N -L 8025:smtp.comcast.net:25 my_home_machine -L 8110:mail.comcast.net:110 my_home_machine

then, when changing locations:

ps aux |grep ssh |grep -v grep |awk ?{print $2}? |xargs kill -9

and even better - setup public/private keys and you could use "-i ~/.ssh/public_key" as ssh parameter, to avoid password prompt ==> then could have everything in a shell script

Comment by netfortius 411 weeks ago

The params explaination:

* -f tells ssh to go into the background (daemonize).

* -N tells ssh that you don't want to run a remote command. That is, you only want to forward ports.

* -q tells ssh to be quiet

* -L specifies the port forwarding

If you want use one of the reserved ports (i.e., under 1023),

you will have to run as root (using sudo).

Also if you want to connect to server behind the DMZ, you can use a intermediate. This is useful where your have your local machine outside a firewall; a visible machine on the DMZ; and a third machine invisible to the outside.

ssh -f -N -q -L 80:192.168.1.69:80 [email protected]
Comment by starchox 409 weeks and 2 days ago

You can also allow access to the tunnel from incoming connections besides 127.0.0.1 which is the default when not stipulated.

eg

ssh -f -N -L 0.0.0.0:8080:google.com:80 [email protected]

This allows on any net interface

or

ssh -f -N -L 10.1.1.120:8080:google.com:80 [email protected]

This allows any machine that can access your 10.1.1.120 interface access to the tunnel.

This is not considering firewalls.

Comment by DaveQB 401 weeks and 5 days ago

nice; this line is also very lazy/handy; default ssh tunnel plus recovers automatically after failure. do not forget the sleep!

while :; do ssh [email protected] -L8081:localhost:80 -N -v -g ; sleep 100; done
Comment by cp 274 weeks and 6 days ago

2016-1-26 xiaozhengm

http://www.coachfactory--outletonline.com

http://www.fitflopuk.me.uk

http://www.michaelkorsukbag.co.uk

http://www.get-coachoutletonline.org

http://www.michaelkors-handbag.me.uk

http://www.runningshoes.com.co

http://www.toms-outlet.cc

http://www.ugg-boots-store.com

http://www.louboutinshoes.cc

http://canadagoose.outletmalls.us.com

http://www.nike-blazerlow.fr

http://uggs.uggaustralia.qc.com

http://www.nikestoreuk.me.uk

http://www.true-religionjeans.net.co

http://coach.outletmalls.us.com

http://www.adidasshoes.name

http://michaelkors.adsmall.us.com

http://www.hermesbelt.in.net

http://www.mulberry-bags.org.uk

http://coach.eshopping.us.com

http://louisvuitton.outletmalls.us.com

http://www.hermesuk.org.uk

http://www.katespadeoutletsale.in.net

http://toms.adsmall.us.com

http://www.fitflopssaleclearance.com

http://michaelkors.eshopping.us.com

http://ugg.adsmall.us.com

http://www.louis-vuitton-outlet.us.com

http://www.canadagoosejackets.org.uk

http://ugg.eshopping.us.com

http://www.timberlanduk.me.uk

http://www.jordan13.org

http://christianlouboutin.outletmalls.us.com

http://www.coachoutlet-storeonline.in.net

http://www.instylermax.in.net

http://www.coachfactoryoutletus.in.net

http://www.coachoutlet-storeonline.us.com

http://tiffany.outletmalls.us.com

http://www.louboutin.org.uk

http://www.monclerjacketsoutlet.us.com

http://louboutin.adsmall.us.com

http://www.louisvuitton-borse.it

http://www.mcmhandbags.name

http://www.truereligion-outlet.com

http://www.new-balanceoutlet.us

http://www.louisvuitton-sac-pascher.fr

http://www.outlet-toms.cc

http://canadagoose.shopgioia.com

http://www.coach-factory-outlet-online.us.com

http://www.top-coachoutletstore.org

http://www.edhardy-outlet.name

http://www.jordan6.net

http://www.longchamphandbags.com.co

http://www.chaussurelouboutin-pascher.fr

http://www.ghdstraighteners.me.uk

http://www.nike-tn-pascher.fr

http://www.saclongchamp-solde.fr

http://www.coachcanadaoutlet.ca

http://burberryoutlet.outletmalls.us.com

http://sunglasses.outletmalls.us.com

http://www.michael--korsoutlet.us.com

http://www.nikefreeruns.uk

http://michaelkors.outletmalls.us.com

http://www.mk-michaelkorsoutletonline.com

http://www.cheaplouisvuittonhandbags.org

http://burberry.eshopping.us.com

http://www.michaelkors-outletonlines.in.net

http://www.airjordan-pascher.fr

http://www.ralphlaurenuk.me.uk

http://www.moncler-jackets.org

http://www.adidassuperstar.co.uk

http://abercrombie.shopgioia.com

http://www.authenticlouisvuittonhandbags.net

http://www.airforce1-nike.fr

http://www.coach-factoryoutlet.cc

http://www.coachoutletonlinespick.org

http://www.coachouletbtf.com

http://rayban.eshopping.us.com

http://www.ghdhairstraighteners.com.co

http://www.ralph-lauren-pas-cher.fr

http://ralphlauren.shopgioia.com

http://rayban.adsmall.us.com

http://www.mcmoutlet.us

http://www.louisvuittonuk.me.uk

http://www.jordan-femmepascher.fr

http://www.toms.in.net

http://burberry.outletmalls.us.com

http://www.cheap-uggsonsale.in.net

http://oakley.adsmall.us.com

http://www.basketballshoes.net.co

http://ugg.shopgioia.com

http://www.raybansoutlet.in.net

http://www.mizunorunningshoes.in.net

http://www.pandoracharms.com.co

http://www.truereligion-outlet.in.net

http://www.michaelkorsoutletoff.in.net

http://www.tomswedges.in.net

http://ugg.outletmalls.us.com

http://www.cheapjordansshoes.in.net

http://www.mymichaelkorssoutlets.org

http://www.airjordan-uk.org.uk

http://www.michaelkors-handbags.me.uk

http://www.nikeblazers.me.uk

http://burberry.shopgioia.com

http://timberland.adsmall.us.com

http://coach.adsmall.us.com

http://www.nike-airmax90.me.uk

http://www.nikesb.uk

http://www.nikerosherunwomen.me.uk

http://www.christianlouboutinuk.me.uk

http://www.ugg-boots-australia.com

http://www.adidas-trainers.me.uk

http://www.michaelkors-discount.com

http://www.polooutlet.us.com

http://www.niketrainers.com.co

http://www.airmax95.org.uk

http://www.montblancpens.us.org

http://www.adidasuk.org.uk

http://www.poloralphlauren.net.co

http://www.rolex-replicawatches.com.co

http://www.ralph-lauren.me.uk

http://www.jordan3.net

http://www.cheapwholesaleuggboots.com

http://hollister.shopgioia.com

http://www.michaelkorshandbags.cc

http://www.fitflops.in.net

http://www.snapbacks-wholesale.us

http://www.edhardyukclothing.me.uk

http://www.michaelkors-outlet-handbags.com

http://www.fitflops.us

http://www.raybans.org.uk

http://northface.outletmalls.us.com

http://nike.outletmalls.us.com

http://www.michaelkorsoutletforus.com

http://www.toryburchoutlet-sale.in.net

http://www.juicy-couture.us

http://www.raybansunglassesdeals.com.co

http://www.louis-vuittonhandbags.us

http://www.quality-outlet.com

http://christianlouboutin.eshopping.us.com

http://www.cheap-tomsoutlet.us

http://www.longchampoutlet.net.co

http://www.michaelkors-bags.me.uk

http://www.louisvuittonoutlets.name

http://www.coach-factoryoutlet.eu.com

http://www.tomsshoes.us.com

http://www.canadagooseoutlet.cc

http://canadagoose.adsmall.us.com

http://www.adidasgazelle.me.uk

http://christianlouboutin.shopgioia.com

http://www.kate-spadeoutlet.com.co

http://www.pradaoutlet.name

http://www.guccioutlet.com.so

http://www.jordan4.net

http://canadagoose.eshopping.us.com

http://www.michael-korshandbags.net.co

http://www.soccer-jerseys.us.com

http://www.nikerosheruns.me.uk

http://www.truereligion-outlet.net.co

http://oakley.shopgioia.com

http://www.sunglass-outlet.us

http://www.chiflatiron.in.net

http://www.tomsoutletstore.in.net

http://www.coachoutletstoreonlines.us

http://www.gucci-borse.it

http://www.jordan8.net

http://www.michaelkors-mkoutlet.in.net

http://www.chaussure-louboutin.fr

http://www.michaelkors-outletsale.com

http://www.michael-korsuk.me.uk

http://www.nike-airmax.org.uk

http://burberry.adsmall.us.com

http://www.montblanc-pens.name

http://www.sac-longchamppliage.fr

http://www.saclongchamp--pascher.fr

http://www.michaelkorsoutletvip.in.net

http://www.cheapjordans.com.co

http://www.louisvuitton-outletstores.org

http://www.marc-jacobs.in.net

http://www.pandorajewelryoutlet.name

http://www.christianlouboutinsell.net

http://www.michael-kors-handbags.uk

http://rayban.shopgioia.com

http://www.oakleysunglassesfake.in.net

http://www.kate-spadeoutlet.us

http://www.coach-factoryoutlet.com.co

http://www.gucci-outlet.org

http://www.adidas-shoes.me.uk

http://ralphlauren.eshopping.us.com

http://oakley.eshopping.us.com

http://www.vipmichaelkors-outletonline.com

http://www.canadagooseuk.me.uk

http://www.oakley--sunglasses.us.org

http://www.kate-spadeoutlet.in.net

http://truereligion.adsmall.us.com

http://jordan.outletmalls.us.com

http://www.guccioutlet.net.co

http://www.nikeuk.me.uk

http://www.katespadeuk.me.uk

http://www.christianlouboutinoff.us

http://www.nikecortez.com.co

http://www.nikehuarache.com.co

Comment by xiaozhengm 51 weeks ago

In another country trade marketplace broker agent FXDD features truly transferred to an alternative office with Several Globe Career Ability. The company, which was previously located from 70 Park Spot, agreed upon some sort of 13-year hire for your Forty,000-square-foot business office. FXDD offers actually presently transferred into the brand-new workplace to suit its broadening list connected with individuals.Numerous a long time ago, list big Supermarkets made an effort to throw open shops inside Queens along with Staten Tropical isle, however supported along following intense spot competitors. Now the markdown string retail store is attempting once again for you to burglarize the revolutionary you are able to town Metropolis current market, considering that this believes technicians currently have modified, while using location ending up becoming a lot more alert to comparable retailers just like Goal and Ikea. Wal-mart is definitely looking at qualities in each in the 5 various districts, in addition to employed Gran Michael Bloomberg's former project supervisor to support arrange it's lobbying endeavours. A site in Eastern side Nyc was into account, however competitors on the task concern in which Your local supermarket is going to be damaging to lesser local companies that may not take about the store's extremely low rates.Michal Kors was born using the label Karl Anderson Jr .. & nbspHe was born inside silent city of Merrick New york city which can be put on Prolonged Island. & nbspHis mom, Joan Burger Anderson Kors Krystosek was a product. The woman have also been Judaism that was exactly how Eileen had been enhanced. The actual prevalent misspellings of his / her subject include Eileen Koors, Erika Khors, Eileen Cors, Eileen Korrs in addition to Micheal Kors.MCR Advancement has really got such a profile associated with 15 Marriott and Hilton accommodations pertaining to $164 500, writing among the largest resort manage the nation alternatives this season. The product involving largely extended-stay hotels, incorporate One particular,75 bedrooms around New york, Nj-new jersey, Burglary and also Philadelphia. The property owner, developer Briad Group, used into the account for a longer time in comparison with that planned. Briad, that designed the actual lodgings among '07 along with The year of 2010, decided to arrive throughout the tough economy ahead of off-loading the properties.Foreign budgets are aiming to invest in Ny business office along with housing structures by paying costs beyond those that make sense financially for home-based clients.Simply a few of the developers as well as libraries dealing with locks this current year feature; Dolce & Gabbana, Marc http://www.hermesbeltsbirkinkellybag.co.uk/ Jacobs,, Ould - Sui, Costs Blass, D Karan, Handbags, Zac Posen, At the & James, Jil Stuart, Rob Lauren, Venexiana (Kati Strict), Observara Wang, Zang Toi, Zandra Rhodes, Zuki, and BYTE Giuliana Teso.Today, you might not locate a yubiwa water line anywhere globally, however, the actual name Casio continues to be within the lips of people almost everywhere. Today, they will create many various solutions offering brilliant watches which are every bit as well-liked these days as being the yubiwa water line seemed to be during Planet Battle A couple of.Anybody fully grasp which you superb incredibly vital come about as well as carry upcoming day time, produce distinct that you simply attain plenty of get some good snooze. Obviously, a definitely not essentially enough other parts definitely will varieties develop loss of point of view, which may injured the particular in addition from the paints you entirely get. Get yourself a at least 8-10 time connected with remainder the night time before a photograph blast.

Comment by stephanieg915 15 hours ago

Handbags are viewed to be the most widely used along with essential accessory for girls in the world. Components, just like custom handbags, hand bags as well as totes are essential to offer the dual aim of operation as well as fashion. These types of extras function luminously with both laid-back along with elegant dresses.Designer handbags are seen to get quite popular that many and each and every female wants to possess at least some these people. Not simply handbags, however you can find custom totes and pouches available too in the marketplace these days. It is just a renowned proven http://www.hermesbeltsbirkinkellybag.co.uk/ fact that women"s never bargain about newest fashion and as simply no girl can present off of a total glimpse without the fully complementing popular handbag, it truly is crystal clear the reason why developers put on a great deal of pounds in manufacturing these designer handbags.There are numerous organizations and types that have bombarded your markets using custom handbags. Custom bags are not only found style and stylish, they also are of top quality and durable, making them apparent number of girls and women all across the globe.While getting custom made handbags via industry isn"t a practical option for the majority of people on account of expensive, there are a few alternate answers, which make the item easier for the people individuals who have lower income. Using these, they are able to purchase extremely elegant designer handbags and appear their very best in most occasions.Finding handbags online shopping web site is the most exceptional option, if you would like invest in a artist handbag which can make your entire good friends always be envious individuals. The particular handbags websites provide the exact same developer bags you can get in marketplace but from very reasonable costs. There"s no reason to become distrustful concerning the genuineness of handbags, as a result of affordable prices.The belief that these types of handbags buying online websites usually are competent to offer these developer handbags in cost-effective price points compared to traditional stores is because get them with the Se area in mass quantity. Thus, you can purchase these handbags with lower costs as compared to the market segments and create substantial income. The actual confusion could be that the most of these types of handbags is reproductions and will puzzle a person, yet you"ve being intent as part of your queries.There are a few designer handbags online companies which usually market knockoffs and also phony artist handbags. You must prevent these people and make sure the business that you decide on stood a reputable status out there. The only real way to makes confident is simply by checking out a great deal of internet websites then verifying the details offered at this time there. The actual testimonials offered there because of the consumers could also help you to decide on the proper internet sites.The good thing about acquiring designer handbags online is some companies present you with facilities including totally free. This way, you actually don"t be concerned regarding the site connected with stores as well as availability of handbags near your own home. There"re likewise businesses which often advertise handbags in large quantities online and assist you to obtain many bags with affordable costs useful later on with regard to giving gifts applications.

Comment by stephanieg915 9 hours ago

Your point of view

You must be signed in to comment.