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

Add to Instapaper
Adds URL to Instapaper. Usage: instapaper-add user@example.com 12345 http://www.commandlinefu.com/

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"

revert a file with svn

View facebook friend list [hidden or not hidden]
There's no need to be logged in facebook. I could do more JSON filtering but you get the idea... Replace u=4 (Mark Zuckerberg, Facebook creator) with desired uid. Hidden or not hidden... Scary, don't you?

List every docker's name, IP and port mapping

To find the uptime of each process-id of particular service or process

Binary search/replace
Replace all instances of "A" with "B" in file "source" saved as file "destination". !! IF A/B is multi-byte, then separate bytes with spaces like so: "s/20\ 0A/00/g".

Spawn a retro style terminal emulator.
Just note that ctrl+shift+t to make new tabs will not work with . Pair it with a terminal multiplexer like for the best experience.

Fork Bomb for Windows
Quick and dirty forkbomb for all flavors of windows Do not use in production. Replace start with a command of your choice, this will just open a new command prompt and is pretty tricky to stop once started

change dinosaur poop into gold
if firefox is running the database is locked, so you need to copy the places.sqlite file temporarily somewhere to be able to query 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: