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

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

ssh: change directory while connecting
Useful to create an alias that sends you right in the directory you want : alias server-etc="ssh -t server 'cd /etc && $SHELL'"

locating packages held back, such as with "aptitude hold "
locating packages held back, such as with "aptitude hold "

Display any tcp connections to apache
Sometimes apache will get stuck in an established state where you can't get a list of the connecting IP's from mod_status... not a good thing when you need to ban an abusive ip.

check the status of 'dd' in progress (OS X)
Your platform may not have pv by default. If you are using Homebew on OSX, simply 'brew install pv'.

Find all plain text files that do not contain STRING

colorize your svn diff
Will colorize your svn diff.

Create a backup of the file.
It will create a backup of the filename. The advantage is that if you list the folder the backups will be sorted by date. The command works on any unix in bash.

Search specified $TEXT1 and Replace that by specified arg ($TEXT2)

Extract audio from start to end position from a video
mplayer -vc null -vo null -ao pcm Firefly\ ep\ 10.avi -ss 195 -endpos 246 Will create file audiodump.wav with audio from second 195 to second 246 (the opnening theme).


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: