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.

If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

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.

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:



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!

Top Tags





Commands tagged oauth header from sorted by
Terminal - Commands tagged oauth header - 2 results
step1 ; step2 ; step3 ; step4 ; curl -o- --get 'https://stream.twitter.com/1/statuses/filter.json' --header "$oauth_header" --data "follow=$id"


You'll need a few minutes of CAREFUL reading before making your own Twitter feed:

In 2010 simple command line Twitter feed requests all stopped working because Twitter upgraded to SSL security.

Https requests for a filtered Twitter stream feed now require a special header called "oauth_header".

The benefit is that your stream feed and login info is securely encrypted.

The bad news is that an "oauth_header" takes some work to build.

Fortunately, four functions, imaginatively named step1, step2, step3 and step4 can be used to build a customized oauth_header for you in a few minutes.

Now, go look at "step1" to start creating your own oauth_header!

step4() { oauth_header="Authorization: OAuth oauth_consumer_key=\"$k1\", oauth_nonce=\"$once\", oauth_signature=\"$signature\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"$ts\", oauth_token=\"$k3\", oauth_version=\"1.0\"" ; }

This is the FOURTH in a set of five commands. Please see my other commands for the previous three steps.

This command builds the authorization header required by Twitter.

For this command to work, see my previous 3 commands (step1, step2 and step3) as they are required to build the environment variables used in this command.

For more information on the authorization header, go to dev.twitter.com/apps, click on any of your apps (or create a new one) and then click on the "OAuth Tool" tab.