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

Show permissions of current directory and all directories upwards to /
Useful if a different user cannot access some directory and you want to know which directory on the way misses the x bit.

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

list files recursively by size

Short one line while loop that outputs parameterized content from one file to another

Recursively scan directories for mp3s and pass them to mplayer
The command first deletes any old playlist calles playlist.tmp under /tmp. After that it recursively searches all direcotries under ~/mp3 and stores the result in /tmp/playlist.tmp. After havin created the playlist, the command will execute mplayer which will shuffle through the playlist. This command is aliased to m is aliased to `rm -rf /tmp/playlist.tmp && find ~/mp3 -name *.mp3 > /tmp/playlist.tmp && mplayer -playlist /tmp/playlist.tmp -shuffle -loop 0 | grep Playing' in my ~/.bashrc.

ascii digital clock
# ### ### # # ### ### # # # ## # # ### # # # # ### ## # # # # # # ### # # # # ### # # # # # ### ##### # # ##### # # # ### # # ### # # # # # ### # # ### # # ##### ### ### # ##### ### ##### #

Find the package that installed a command

Write and read HDD external
Write and read HDD external FreeBSD

Get your outgoing IP address
should be very consistent cause it's google :-)

Recursively unrar into dir containing archive
From the cwd, recursively find all rar files, extracting each rar into the directory where it was found, rather than cwd. A nice time saver if you've used wget or similar to mirror something, where each sub dir contains an rar archive. Its likely this can be tuned to work with multi-part archives where all parts use ambiguous .rar extensions but I didn't test this. Perhaps unrar would handle this gracefully anyway?


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: