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

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"

See system users

Open a file explorer on a split screen inside your vim session
Open a CLI file explorer by splitting up your screen inside your vim session. Besides, you probably are never going to forget this one.

convert video to gif by ffmpeg and imagemagick
you can use any common video format. if you don't need to change the size of gif output, just remove `-vf scale=320:-1` btw, 320:-1 means width is 320px and height would be set automatically

git diff of files that have been staged ie 'git add'ed

Stop procrastination on Facebook.com
or echo '127.0.0.1 facebook.com' | sudo tee -a /etc/hosts Do not execute this command if you don't know what you are doing.

creeate file named after actual date
Create a file with actual date as filename

Get My Public IP Address

Send an http HEAD request w/curl

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously


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: