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

Rotate all jpeg images in current folder, rename them to EXIF datetime and set files timestamp to EXIF datetime

Create strong, but easy to remember password
Why remember? Generate! Up to 48 chars, works on any unix-like system (NB: BSD use md5 instead of md5sum)

Monitor iptables in realtime

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"

set a reminder for 5 days in the future
setup for reminder in 5 days, added the date in the future. To run a job at 4pm three days from now, you would do at 4pm + 3 days, to run a job at 10:00am on July 31, you would do at 10am Jul 31 and to run a job at 1am tomorrow, you would do at 1am tomorrow.

Get a process's pid by supplying its name

Start a terminal with three open tabs
If you launch gnome-terminal manually, you can start with three open tabs

Step#2 Create a copy of the bootload and partition table!
Step#2 Create a copy of the bootload and partition table!

Find and list users who talk like "lolcats"
Greps IRC logs for phrases and lists users who said them.

View acceptable client certificate CA names asked for during SSL renegotiations
The key is to use the -prexit option at the command line, and then type "quit" instead of CTRL-C to exit OpenSSL. OpenSSL will then dump its last negotiated state, printing out the contents of the renegotiated handshake. Crucial for debugging client certificate configurations on web servers such as IIS, which renegotiate the SSL/TLS connection with the HTTP request in-flight to ask the client for a cert.


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: