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

Unencrypted voicechat
Sends the microphone input from PC1 to the speakers of PC2. Do the same in reverse to have an actual conversation ;) ... maybe with another port tough

Use result of the last command
\$ which python /usr/bin/python \$ ll `!!` lrwxrwxrwx 1 root root 9 2010-11-08 22:01 /usr/bin/python -> python2.6

Find the package that installed a command

Pronounce an English word using Merriam-Webster.com
The original was a little bit too complicated for me. This one does not use any variables.

Remove duplicate lines whilst keeping empty lines and order
Remove duplicate lines whilst keeping order and empty lines

Make changes in any profile available immediately/Change to default group
Changes your group to the default group, has the same effect as sourcing your profile/rc file (in any shell) or logging out and back in again.

flip faster and more precisely through commands saved in history
flip shell history with PG UP/PG DOWN like with arrows. just type ss and PG UP and see all ssh commands, type ls and PG DOWN - see all ls commands. need to uncomment two options in /etc/inputrc: "\e[5~": history-search-backward "\e[6~": history-search-forward hack found: http://broddlit.wordpress.com/2008/04/12/making-the-bash-history-a-better-place/

tail a log over ssh
This is also handy for taking a look at resource usage of a remote box. $ ssh -t remotebox top

send a .loc file to a garmin gps over usb
gps data from geocaching.com is provided for free in .loc format.

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"


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: