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

recursive search and replace old with new string, inside files
If you can install rpl it's simpler to use and faster than combinations of find, grep and sed. See man rpl for various options. time on above operation: real 0m0.862s, user 0m0.548s, sys 0m0.180s using find + sed: real 0m3.546s, user 0m1.752s, sys 0m1.580s

Save an HTML page, and covert it to a .pdf file
Uses htmldoc to perform the conversion

python2 -m CGIHTTPServer
In case you need to test some CGI scripts this does the job. It also has the functionality of a http server. Enjoy!

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

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

Update all ant packages installed in gentoo
Update all "ant" packages installed on Gentoo

Cleanup firefox's database.
For Mac OS X users only

Another Matrix Style Implementation

How to estimate the storage size of all files not named *.[extension] on the current directory
With this sentence we can estimate the storage size of all files not named *.jpg on the current directory. The syntax is based on Linux, for Unix compliance use: find ./* -prune ! -name '*.jpg' -ls |awk '{TOTAL+=$7} END {print int(TOTAL/(1024^2))"MB"}' We can change the jpg extension for whatever extension what we need

A simple command to toggle mute with pulseaudio (any sink)
0 can also be replaced by the source name, e.g. alsa_output.pci-0000_00_1b.0.analog-stereo


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: