What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

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:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags



Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

Commands by KoRoVaMiLK from sorted by
Terminal - Commands by KoRoVaMiLK - 9 results
pwgen -Bnyc
2012-03-15 14:38:15
User: KoRoVaMiLK

These are my favourite switches on pwgen:

-B Don't include ambiguous characters in the password

-n Include at least one number in the password

-y Include at least one special symbol in the password

-c Include at least one capital letter in the password

It just works!

Add a number to set password length, add another to set how many password to output. Example:

pwgen -Bnyc 12 20

this will output 20 password of 12 chars length.

ntpq -p
2010-09-14 07:39:20
User: KoRoVaMiLK

Used to verify if Network Time Protocol daemon is working properly.

squidclient mgr:info | grep "file desc"
2010-07-29 17:35:20
User: KoRoVaMiLK
Functions: grep

Shows useful informations about file descriptors in Squid web proxy

perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e' < /var/log/squid/access.log
2010-06-22 08:42:40
User: KoRoVaMiLK
Functions: perl

On-the-fly conversion of Unix Time to human-readable in Squid's access.log

ssh -fY [email protected] firefox -no-remote
2010-06-03 07:24:07
User: KoRoVaMiLK
Functions: ssh

Actually 'firefox' is a script that then launches the 'firefox-bin' executable. You need to specify the 'no-remote' option in order to launch remote firefox instead of your local one (this drove me crazy time ago)

pear config-set http_proxy http://myusername:[email protected]:8080
2010-05-13 14:44:03
User: KoRoVaMiLK

Useful since

"export http_proxy=blahblah:8080"

doesn't seem to work with pear

slapcat -n 1 > /backup/`date "+%Y%m%d"`.ldif
2010-05-07 15:52:39
User: KoRoVaMiLK

Simple way to backup your LDAP entries: put this line on your crontab.

The -n switch identifies the dbnum you want to backup (alternatively you can use -b suffix. Check man slapcat for your personal switches)

who -r
2010-05-05 12:58:09
User: KoRoVaMiLK
Functions: who

Prints current runlevel and system start time.

On older systems it also shows the last init state.

Pretty useful on remote systems, pretty useless on local ones :)

ssh -q [email protected]
2010-03-24 12:02:55
User: KoRoVaMiLK
Functions: ssh

This allows you to skip the banner (usually /etc/issue.net) on ssh connections.

Useful to avoid banners outputted to your mail by rsync cronjobs.