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

File browser
Simple file browser with dmenu, ls, and xdg-open.

sed : using colons as separators instead of forward slashes
Having to escape forwardslashes when using sed can be a pain. However, it's possible to instead of using / as the separator to use : . I found this by trying to substitute $PWD into my pattern, like so $ sed "s/~.*/$PWD/" file.txt Of course, $PWD will expand to a character string that begins with a / , which will make sed spit out an error such as "sed: -e expression #1, char 8: unknown option to `s'". So simply changing it to $ sed "s:~.*:$PWD:" file.txt did the trick.

Rename file to same name plus datestamp of last modification.
FILENAME=nohup.out mv -iv $FILENAME{,.$(stat -c %Y $FILENAME)} does it help ?

Print CPU load in percent
Faster then all other commands here at cmdlinefu with the same purpose.

Press a key automatically
Press a key automatically via xvkbd.

Offcloud - add a link as remote download
You will get an json respond if all is fine

Look for English words in /dev/urandom
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt

Download all recently uploaded pastes on pastebin.com

monitor what processes are waiting for IO interrupts

MoscowML with editable input-line and history
Works also with SML/NJ and other interpreters or tools with interactive environments.


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: