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

Find the location of the currently loaded php.ini file

Generate SHA1 hash for each file in a list
List files and pass to openssl to calculate the hash for each file.

drop first column of output by piping to this
An advantage is that this doesn't modify remained string at all. One can change {0,1} with {0,n} to drop several columns

ssh X tunneling over multiple ssh hosts (through ssh proxy)
Simply makes it possible to launch any X application residing on sshhost through sshproxy and display it on your screen where ever you are.

Find the top 10 directories containing the highest number of files
It can be used to pinpoint the path(s) where the largest number of files resides when running out of free i-nodes

Generate a Change Log with git
Generate a changelog between the v1 and v2 tags

currently mounted filesystems in nice layout
since fuse mounts do not appear in /etc/mtab (fuse can't write there, dunno if it would if it could) this is propably a better way.

Run the last command as root
Useful when you forget to use sudo for a command. "!!" grabs the last run command.

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"

Turn white color to transparent for a series of png images
mogrify can be used like convert. The difference is that mogrify overwrites files: http://www.imagemagick.org/www/mogrify.html Of course, other source colors can be used as well.


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: