Commands by ryanmjacobs (1)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

print a python-script (or any other code) with syntax-highlighting and no loss of indentation

Get the header of a website

bash find function
basic find implementation for systems that don't actually have find, like an android console without busybox installed.

Finding the number of cpu's

add a gpg key to aptitute package manager in a ubuntu system
when we add a new package to a aptitude (the debian package manager) we need to add the gpg, otherwise it will show warning / error for missing key

Make a thumbnail image of first page of a PDF.
convert is included in ImageMagick. Don't forget the [X] (where X is the page number). [0] is the first page of the PDF.

Install pip with Proxy
Installs pip packages defining a proxy

Clone all repos from a user with lynx
https://wuseman.github.io/wcloner/

pip install into current directory without virtualenv
For subsequent commands in the prefixed path: $ PYTHONPATH=$PWD/lib/python*/site-packages ./bin/pip --version

Reset terminal that has been buggered by binary input or similar


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: