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

Watch the progress of 'dd'
run this in another terminal, were xxxx is the process ID of the running dd process. the progress will report on the original terminal that you ran dd on

Convert a string to "Title Case"

Check Ram Speed and Type in Linux
from http://maysayadkaba.blogspot.com/2008/08/linux-check-ram-speed-and-type.html

Trigger a command each time a file is created in a directory (inotify)
Listens for events in the directory. Each created file is displayed on stdout. Then each fileline is read by the loop and a command is run. This can be used to force permissions in a directory, as an alternative for umask. More details: http://en.positon.org/post/A-solution-to-the-umask-problem%3A-inotify-to-force-permissions

Block an IP address from connecting to a server
This appends (-A) a new rule to the INPUT chain, which specifies to drop all packets from a source (-s) IP address.

Play all the music in a folder, on shuffle
Play files in shuffle mode with bash and mpg123. Why bother using big-as-hell stuff like mplayer? This will play all your music files contained in */* (in my case author/song.format) with bash and mplayer showing a nice output.

Create date-based tgz of current dir, runs in the background, very very cool
This is freaking sweet!!! Here is the full alias, (I didn't want to cause display problems on commandlinefu.com's homepage): $ alias tarred='( ( D=`builtin pwd`; F=$(date +$HOME/`sed "s,[/ ],#,g"

Set all CPU cores' CPU frequency scaling governor to maximum performance

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Save xkcd to a pdf with captions
Saves to a PDF with title and alt text of comic. As asked for on http://bbs.archlinux.org/viewtopic.php?id=91100 Change xkcd.com to dynamic.xkcd.com/comics/random for a random comic.


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: