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

See the 10 programs the most used

Locate config files of the program
Locate config files of the program. May not be used for interactive programs like vim.

ping as traceroute
This command uses ping to get the routers' IP addresses to the destination host as traceroute does. If you know what I mean..

display a smiling smiley if the command succeeded and a sad smiley if the command failed
you could save the code between if and fi to a shell script named smiley.sh with the first argument as and then do a smiley.sh to see if the command succeeded. a bit needless but who cares ;)

foo <--> german translation with dict.leo.org
Translate strings from non-german to german (and vice versa) using LEO. Put it in your ~/.bashrc. Usage: $ leo words   To use another language other than english, use an option: $ leo -xx words Valid language options: ch - chinese en - english es - spanish fr - french it - italian pl - polish pt - portuguese ru - russian The other language will always be german!

enable all bash completions in gentoo
enable each bash completion that you have installed at your system, that's very nice ;)

a trash function for bash
Every rm'ed a file you needed? Of course you haven't. But I have. I got sick of it so I created a bash function. Here it is. It'll put trashed files into a $HOME/.Trash/"date" folder according to the date. I have rm aliased to it as well in my bashrc so that I still use the rm command. It'll choke if you attempt to trash a directory if that directory name is already in the Trash. This rarely happens in my case but it's easy enough to add another test and to mv the old dir if necessary. function trash(){ if [ -z "$*" ] ; then echo "Usage: trash filename" else DATE=$( date +%F ) [ -d "${HOME}/.Trash/${DATE}" ] || mkdir -p ${HOME}/.Trash/${DATE} for FILE in $@ ; do mv "${FILE}" "${HOME}/.Trash/${DATE}" echo "${FILE} trashed!" done fi }

your terminal sings
you know the song... sing along

get total of inodes of root partition

Signals list by NUMBER and NAME
This command seems to achieve the similar/same goal.


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: