Commands by corporate_gadfly (3)

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

small CPU benchmark with PI, bc and time.
$ # 4 cores with 2500 pi digits $ CPUBENCH 4 2500 $. $ every core will use 100% cpu and you can see how fast they calculate it. $ if you do 50000 digitits and more it can take hours or days

Remove security limitations from PDF documents using ghostscript (for Windows)
#4345 also works under windows

View internet connection activity in a browser
The output of lsof is piped to txt2html which converts it to html. # Perl module HTML::TextToHTML needed

Realtime apache hits per second
Change the cut range for hits per 10 sec, minute and so on... Grep can be used to filter on url or source IP.

What is my ip?

Quickly analyze apache logs for top 25 most common IP addresses.
This command is much quicker than the alternative of "sort | uniq -c | sort -n".

Prints total line count contribution per user for an SVN repository
make usable on OSX with filenames containing spaces. note: will still break if filenames contain newlines... possible, but who does that?!

Given process ID print its environment variables
Same as previous but without fugly sed =x

Fetch the Gateway Ip Address
Better use iproute2 !

Display / view the contents of the manifest within a Java jar file
Displays the manifest within a jar file. Can use it to confirm version number, etc.


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: