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

shell bash iterate number range with for loop

Count the words in any OpenOffice document (including Impress presentations)
OpenOffice, LibreOffice and OO Impress wordcount

Go to parent directory of filename edited in last command

Retrieve top ip threats from http://isc.sans.org/sources.html and add them into iptables output chain.
Retrieve top ip threats from http://isc.sans.org/sources.html and add them into iptables output chain.

prevent large files from being cached in memory (backups!)
We all know... $ nice -n19 for low CPU priority.   $ ionice -c3 for low I/O priority.   nocache can be useful in related scenarios, when we operate on very large files just a single time, e.g. a backup job. It advises the kernel that no caching is required for the involved files, so our current file cache is not erased, potentially decreasing performance on other, more typical file I/O, e.g. on a desktop.   http://askubuntu.com/questions/122857 https://github.com/Feh/nocache http://packages.debian.org/search?keywords=nocache http://packages.ubuntu.com/search?keywords=nocache   To undo caching of a single file in hindsight, you can do $ cachedel   To check the cache status of a file, do $ cachestats

VIM subst any char different from literal " + EOL with searched string + white space
---- this line ends here but must be concatenated with this one "this line ends here" and should NOT be concatenated with this one

Rsync a directory excluding pesky .svn dirs

Find the package that installed a command

Rename files in batch

How many Linux and Windows devices are on your network?
Shows how many Windows and Linux devices are on your network. May add support for others, but that's all that are on my network right now.


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: