Commands by unixmonkey11639 (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

HOME USE ONLY: Get rid of annoying Polkit password prompts
Although the need to type a password to make certain changes to the system may make perfect sense in a business or educational environment, it makes absolutely zero sense to the home user. So, if you’re at home and would rather get work done than be annoyed by what is essentially Linux’s UAC, then this command is for you.

Find directory depth
Returns a the directory depth.

Print all lines in a file that are not a certain length
Alternatively, print all the lines that are a certain length: $awk 'length($0)==12 {print}' your_file_name

Look for English words in /dev/urandom
* to get the English dictionary: wget http://www.mavi1.org/web_security/wordlists/webster-dictionary.txt

Get number of users on a minecraft server
I'm flat-out surprised that minecraft directory services require servers install multiple modifications to their server code, when the directories could fetch this information on their own.

Print all the lines between 10 and 20 of a file
Subtly different to the -n+p method... and probably wrong in so many ways....... But it's shorter. Just.

Use the arguments used in the last command
Very basic, but who knows.. mkdir !$ should work too, only uses 'the last' argument. !-2 executes cd Desktop/Notes again. More tips in 'man history'

Upgrade all perl modules via CPAN

Find usb device
I often use it to find recently added ou removed device, or using find in /dev, or anything similar. Just run the command, plug the device, and wait to see him and only him

check the status of 'dd' in progress (OS X)
"killall -USR1 dd" does not work in OS X for me. However, sending INFO instead of USR1 works.


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: