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

Sysadmin day date of any given year
Calculate the date of Sysadmin day (last Friday of July) of any given year

Apply permissions only to files
To apply only to dirs: $ chmod 755 $(find . -type d) Use -R parameters for recursive walk.

download newest adminer and rename to it's version accordingly
If the version already downloaded. it will not download again

Create user add lines from partial passwd file
Handy if you are installing a new server or recovering an old one and you have a passwd file with the accounts you want to add to the server. If you edit the file so that only the accounts that you want to add are left this line will spit out the correct useradd lines. The uid, gecos and shell will be preserved.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Split lossless audio (ape, flac, wav, wv) by cue file

change dinosaur poop into gold
if firefox is running the database is locked, so you need to copy the places.sqlite file temporarily somewhere to be able to query it...

Search for files older than 30 days in a directory and list only their names not the full path

list files recursively by size

Tune your guitar from the command line.
This command, taken from play's manual page, plays a synthesized guitar tone for each of the strings on a standard tuned guitar. The command "play" is a part of the package "sox".


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: