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

recurisvely md5 all files in a tree
Found this little gem here: http://info.michael-simons.eu/2008/10/25/recursively-md5sum-all-files-in-a-directory-tree/

Recompress all text files in a subdirectory with lzma
This will deal nicely with filenames containing newlines and will run one lzma process per CPU core. It requires GNU Parallel http://www.youtube.com/watch?v=OpaiGYxkSuQ

Automatically skip bad songs in your MPD playlist.
Case insensitive. Also you can pull in the songs from a blacklist, one per line - while :; do (mpc current | grep -i -f blacklist.txt && mpc next); sleep 5; done

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

Continuously show wifi signal strength on a mac
The closer to zero the better.Credit to TheSeb on macrumors: http://forums.macrumors.com/showthread.php?t=1289884

Detect illegal access to kernel space, potentially useful for Meltdown detection
Based on capsule8 agent examples, not rigorously tested

Find
A lot of X applications accept --geometry parameter so that you can set application size and position. But how can you figure out the exact arguments for --geometry? Launch an application, resize and reposition its window as needed, then launch xwininfo in a terminal an click on the application window. You will see some useful window info including its geometry.

return external ip
Get your ip address, hostname, ASN and geolocation information. If you want just one field as a text response you can also get that,eg curl ipinfo.io/ip

grab all commandlinefu shell functions into a single file, suitable for sourcing.
Much simpler but not as many features as the alternative.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.


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: