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

Extract title from HTML files
Case Insensitive! and Works even if the "<title>...</title>" spans over multiple line. Simple! :-)

Read random news on the internet
Access a random news web page on the internet. The Links browser can of course be replaced by Firefox or any modern graphical web browser.

Backup with versioning
Apart from an exact copy of your recent contents, also keep all earlier versions of files and folders that were modified or deleted. Inspired by EVACopy http://evacopy.sourceforge.net

Cancel all aptitude scheduled actions
Very handy if you have done a package selection mistake in aptitude. Note that it's better to do a Ctrl+U (undo) in aptitude if possible, because the keep-all will clear some package states (like the 'hold' state).

Check if your desired password is already available in haveibeenpwnd database. This command uses the API provided by HIBP

I hate `echo X | Y`
apart from not being generalisable to all shells, `Y <<< X` seems nicer to me than `echo X | Y`, e.g. $ <<< lol cat; it reads easier, you type less, and it also looks cool

Limit the cpu usage of a process
This will limit the average amount of CPU it consumes.

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.

Get the IP of the host your coming from when logged in remotely
Even faster without the need for cut... :)

Make a statistic about the lines of code
use find to grep all .c files from the target directory, cat them into one stream, then piped to wc to count the lines


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: