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

list files recursively by size

Comparison between the execution output of the last and penultimate command
Useful for checking if there are differences between last and penultimate command.

What is My WAN IP?
The curl command retrieve the HTML text containing the IP address. The grep command picks out the IP address from that HTML text.

Rename all files in lower case
rename is a really powerfull to, as its name suggests, rename files

Perl Command Line Interpreter
My Programming Languages professor assigned my class a homework assignment where we had to write a Perl interpreter using Perl. I really like Python's interactive command line interpreter which inspired this Perl script.

converts a directory full of source tarballs into a bzr repository so you can compare different versions easily

Open up a man page as PDF (#OSX)
Simply pass an argument to the script to convert the manual page to a PDF: $man2pdf drutil

Replace all tabs with spaces in an application
Note that this assumes the application is an SVN checkout and so we have to throw away all the .svn files before making the substitution.

Get all IPs via ifconfig
Fetches the IPs and ONLY the IPs from ifconfig. Simplest, shortest, cleanest. Perl is too good to be true... (P.S.: credit should go to Peteris Krumins at catonmat.net)

A line across the entire width of the terminal
Use tput cols to find the width of the terminal and set it as the minimum field width.


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: