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

translates acronyms for you
very handy if you are in irc and absolutely don't know what these guys are talking about. this is a netbsd command, if you are lucky it exists in your distro's package database.

Set an alarm to wake up
Sleep 5h and plays the song as a wake up alarm

Remove blank lines from a file using grep and save output to new file
The ^$ within the quotes is a regular expression: ^=beginning of line, $=end of line, with no characters between.

RTFM function
Same as the other rtfm's, but using the more correct xdg-open instead of $BROWSER. I can't find a way to open info only if the term exists, so it stays out of my version.

Convert Youtube videos to MP3
Make your own MP3s from Youtube videos.

LIst svn commits by user for a date range
Outputs a quick summary of the svn commits for a user over a date range with the detail revision logs including comments and files affected. Useful for searching for a particular change or reporting by user.

Decode base64-encoded file in one line of Perl
If you are in an environment where you don't have the base64 executable or MIME tools available, this can be very handy for salvaging email attachments when the headers are mangled but the encoded document itself is intact.

Generate an XKCD #936 style 4 word password
The improvement of this command over Strawp's original alternative is that you can specify the size of the words, in this particular case words between 3 and 5 character's long. It also excludes words that contain apostrophes, if you'd rather keep those words simply substitue [^'] for .

kde4 lock screen command
If you wish to launch the kde4 screen saver without the password prompt to exit, use this command: $ qdbus org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive True Also can be done with: $ /usr/lib/kde4/libexec/kscreenlocker --forcelock

Recursively grep thorugh directory for string in file.
-R, -r, --recursive Read all files under each directory, recursively; this is equivalent to the -d recurse option.


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: