All commands (14,187)

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

Tired of switching between proxy and no proxy? here's the solution.
Replace 10.0.0.0/8 with your largest local subnet. replace 10.1.1.123:3128 with your proxy information.. Note this only works with a proxy server configured for passive setup.. Now your firefox transparently proxy's stuff destined outside your network.. and Doesn't proxy stuff inside your network. as well as all your other favorite web applications. curl, wget, aria2 ect.

Get your Tweets from the command line
Gets the latest Tweets in your friends timeline from Twitter. Uses curl and xmlstarlet.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Update IP filter for qBittorrent
Downloads Bluetack's level 1 IP blocklist in .p2p format, suitable for various Bittorrent clients.

Close shell keeping all subprocess running

List all authors of a particular git project
Gets the authors, sorts by number of commits (as a vague way of estimating how much of the project is their work, i.e. the higher in the list, the more they've done) and then outputs the results.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

find files ignoring .svn and its decendents
for when find . -print | grep -v .svn | xargs doesnt cut it.

For a $FILE, extracts the path, filename, filename without extension and extension.
Useful for use in other scripts for renaming, testing for extensions, etc.

See udev at work
See how your system works with pendrives/mice/monitors/whatever-you-can-plug-in. Use cases: see on which /dev/... your peripherals are, find out if a specific udev rule is being applied correctly.


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: