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

...if you have sudo access, you could just install ssh-copy-id (Mac users: take note. this is how you install ssh-copy-id )

Terminal - ...if you have sudo access, you could just install ssh-copy-id (Mac users: take note. this is how you install ssh-copy-id )
sudo curl "http://hg.mindrot.org/openssh/raw-file/c746d1a70cfa/contrib/ssh-copy-id" -o /usr/bin/ssh-copy-id && sudo chmod 755 /usr/bin/ssh-copy-id
2012-02-09 20:29:24
User: misterich
Functions: chmod sudo
-1
...if you have sudo access, you could just install ssh-copy-id (Mac users: take note. this is how you install ssh-copy-id )

Mac install ssh-copy-id

From there on out, you would upload keys to a server like this:

(make sure to double quote the full path to your key)

ssh-copy-id -i "/PATH/TO/YOUR/PRIVATE/KEY" [email protected]

or, if your SSH server uses a different port (often, they will require that the port be '2222' or some other nonsense:

(note the double quotes on *both* the "/path/to/key" and "[email protected] -pXXXX"):

ssh-copy-id -i "/PATH/TO/YOUR/PRIVATE/KEY" "[email protected] -pXXXX"

...where XXXX is the ssh port on that server

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives
cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
2009-02-05 19:37:56
User: DEinspanjer
Functions: cat ssh
62

If you use Mac OS X or some other *nix variant that doesn't come with ssh-copy-id, this one-liner will allow you to add your public key to a remote machine so you can subsequently ssh to that machine without a password.

cat ~/.ssh/id_rsa.pub | ssh <REMOTE> "(cat > tmp.pubkey ; mkdir -p .ssh ; touch .ssh/authorized_keys ; sed -i.bak -e '/$(awk '{print $NF}' ~/.ssh/id_rsa.pub)/d' .ssh/authorized_keys; cat tmp.pubkey >> .ssh/authorized_keys; rm tmp.pubkey)"
2011-09-30 07:39:24
User: tamouse
Functions: cat ssh
Tags: ssh awk
4

This one is a bit more robust -- the remote machine may not have an .ssh directory, and it may not have an authorized_keys file, but if it does already, and you want to replace your ssh public key for some reason, this will work in that case as well, without duplicating the entry.

cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys'
ssh <user>@<host> 'mkdir -m 700 ~/.ssh; echo ' $(< ~/.ssh/id_rsa.pub) ' >> ~/.ssh/authorized_keys ; chmod 600 ~/.ssh/authorized_keys'
2011-10-03 15:59:43
User: Halki
Functions: chmod echo ssh
Tags: ssh ksh
0

Creates the .ssh directory on the remote host with proper permissions, if it doesnt exist. Appends your public key to authorized_keys, and verifies it has proper permissions. (if it didnt exist it may have been created with undesireable permissions).

*Korn shell syntax, may or may not work with bash

cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys; chmod 600 ~/.ssh/authorized_keys"
2012-07-18 04:41:54
Functions: cat ssh
0

chmod authorized_keys so you don't get "Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys"

Know a better way?

If you can do better, submit your command here.

What others think

The handbag is probably the most important products for ladies, which is also handled to be a status symbol. There are lots of types of low-cost handbags available for sale on the web which can be bought through women based on their own certain likes and dislikes and options. The options are endless with regard to layout, style or color. Every woman possesses different alternatives in line with their personalized desire along with careers. Collection of some sort of homeowner is very different from the running women or experts. It's usually advisable for them to get purses and handbags as well as handbags in accordance with their particular precise requirements and needs that needs to be far too of their economical restrictions.Along with some other other activities, pricing is among the most crucial factors for those. And so, handbags are certainly not different. Females ought to consider this issue before buying the item. There are lots of brands that is distinguished production quality handbags for several years through taking into consideration females tastes in addition to alternatives. Its not a good package for a middle-class sweetheart or perhaps a homeowner to obtain some sort of labeled handbag that is usually costlier. Such circumstances, they will get handbags connected with nearby suppliers that happen to be less costly than the first sort somewhat. If you buy these types of local produced handbags by means of looking at these completely, you have access to excellent bags according to your " special " needs and requirements.There will vary places where by various kinds of handbag or even purses is available by simply females per their particular pursuits and also possibilities. They can purchase it traditional coming from a go shopping in close proximity to their surrounding area. Women should opt for any well known store whether or not they are going to invest in a labeled handbag or perhaps bag from nearby makes or perhaps well-known brand names.Although, these things can be obtained real world; however shopping on the web needs to be chosen. There are numerous advantages of online shopping with regards to pricing, quality, design and style together with many other factors.In this specific This (I . t) Time, stuff has been improved drastically with mankind life styles. A similar thing is true intended for buying online. You will discover many more merchants obtainable over http://www.hermesbeltsbirkinkellybag.co.uk/ World-wide-web, which was marketing evening hours handbags in addition to clutches around the world for quite some time according to buyers personalized interests along with alternatives. Most of online stores supply fabulous delivers and also reductions in price for women of all ages. Such gives can be applied achievable in addition to old (active) shoppers. If you are thinking to acquire a designer motorola clutch, wallet or maybe handbag coming from a actual physical go shopping, you cannot obtain these kind of incredible presents provided by numerous websites. As a result, you can get needed selection of handbags, totes or even grip through internet retailers.There are different sources wherever several types of handbag or maybe handbags can be obtained by simply girls according to their particular unique pursuits and also alternatives. They will get it real world at a look close to his or her vicinity. Women of all ages must always give preference to the prominent retail store whether or not are going to invest in a printed handbag or maybe bag coming from community brand names or perhaps esteemed brand names.Although, these items are available not online; on the other hand internet shopping ought to be preferred. There are lots of benefits of buying online with regard to costing, top quality, layout in addition to many other factors.

Comment by stephanieg915 1 week and 1 day ago

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-noir-homme_384.html

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

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

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

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/prix-d-une-canada-goose-au-canada_175.html

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

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

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

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

Comment by sguerra376 5 days ago

http://www.canadagoosefemmehomme2016.fr/comment-reconnaitre-une-canada-goose_478.html

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

http://www.canadagoosefemmehomme2016.fr/manteau-comme-canada-goose_226.html

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/ontario-canada-goose_96.html

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/vente-canada-goose-montreal_160.html

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

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

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

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

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

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

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

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

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

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

Comment by sguerra376 5 days ago

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

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

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

http://www.canadagoosefemmehomme2016.fr/comment-reconnaitre-une-canada-goose_478.html

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

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

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

http://www.canadagoosefemmehomme2016.fr/canada-goose-fourrure-amovible_71.html

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

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

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

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

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

http://www.canadagoosefemmehomme2016.fr/ou-trouver-canada-goose_232.html

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

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

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

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

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

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

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

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

Comment by sguerra376 3 days ago

Your point of view

You must be signed in to comment.