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

Remove all the files except abc in the directory
This is for zsh with extended globbing.

Create Encrypted WordPress MySQL Backup without any DB details, just the wp-config.php
The coolest way I've found to backup a wordpress mysql database using encryption, and using local variables created directly from the wp-config.php file so that you don't have to type them- which would allow someone sniffing your terminal or viewing your shell history to see your info. I use a variation of this for my servers that have hundreds of wordpress installs and databases by using a find command for the wp-config.php file and passing that through xargs to my function.

Using Git, stage all manually deleted files.
You'll probably want to pass in the -rf options if you have to delete a directory or something.

Remove space and/or tab characters at the end of line
The command removes all space and/or tabulation characters preceding new line

eavesdrop
Record off the microphone on a remote computer and listen to it live through your speakers locally.

OpenDns IP update via curl
Your IP is resolved by OpenDns Server (like a caller ID telephone, every server knows who is calling ;-) Change user:password by yours Be Happy

Send an http HEAD request w/curl

Do some learning...
no loop, only one call of grep, scrollable ("less is more", more or less...)

Have your sound card call out elapsed time.
Useful contexts : You are doing yoga or some other physical training in which you are holding a position. Or you practice the pomodoro productivity technique. Or your girlfriend said "We're leaving in 40 minutes". Design details: sleep executes before espeak to give you a 5 seconds head start. espeak is run in the background so it doesn't mess up the timing.

Arguments too long


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: