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

return a titlecased version of the string
Needs Bash4. Found at http://stackoverflow.com/questions/2264428/converting-string-to-lower-case-in-bash-shell-scripting alongside a few other tricks.

Shows what processes need to be restarted after system upgrade
This command can be installed in debian by the package debian-goodies. It also outputs the /etc/init.d/ commands that you need to do.

fetch all revisions of a specific file in an SVN repository
exported files will get a .r23 extension (where 23 is the revision number)

Lookup hostname for IP address

List your largest installed packages.
Calculates the size on disk for each package installed on the filesystem (or removed but not purged). This is missing the $ | sort -rn which would put the biggest packges on top. That was purposely left out as the command is slightly on the slow side Also you may need to run this as root as some files can only be checked by du if you can read them ;)

remove files and directories with acces time older than a given date
touch a dummy file with the specified date, then use find with -anewer .

Edit Camera Model in metadata:

Lists all listening ports together with the PID of the associated process
The PID will only be printed if you're holding a root equivalent ID.

Execute a command with a timeout

bash alias for sdiff: differ
this is just okey


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: