Commands by Leo_Gutierrez (1)

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

Clear all Windows Event Log entries (cygwin)
Efficiently clear all Windows Event log entries from within a Cygwin terminal. Uses "cygstart" to launch a hidden "PowerShell" session passing a Powershell command to loop through and clear all Windows Event Log entries. Very useful for troubleshooting and debugging. The command should in theory elevate you session if needed. One liner is based on the PowerShell command: $ wevtutil el | foreach { wevtutil cl $_ }

Length of longest line of code
Here's an awk version.

Print all git repos from a user
in case you could afford installing jq

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?!

Testing php configuration

Get your external IP address if your machine has a DNS entry
Easy way to see your real external IP

ping a host until it responds, then play a sound, then exit
This allows for sleeping in between pings. Also, espeak needs to be installed.

resolve hostname to IP our vice versa with less output
inverted version: resolveip -s 216.34.181.xxx freshmeat.net

Get all upgradable deb packages in a single line
Works for debian and ubuntu based distros.

Make vim open in tabs by default (save to .profile)
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.


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: