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

LDAP search to query an ActiveDirectory server

Terminal - LDAP search to query an ActiveDirectory server
ldapsearch -LLL -H ldap://activedirectory.example.com:389 -b 'dc=example,dc=com' -D 'DOMAIN\Joe.Bloggs' -w [email protected]' '(sAMAccountName=joe.bloggs)'
2009-06-11 13:07:11
User: greppo
LDAP search to query an ActiveDirectory server

These are the parameters to ldapsearch (from ldap-utils in Ubuntu), for searching for the record for Joe Blogg's user. sAMAccountName is the LDAP field that ActiveDirectory uses to store the user name. 'DOMAIN\Joe.Bloggs' where "DOMAIN" is the the active directory domain.

Othewise you could use "CN=Joe.Bloggs,DC=example,DC=com" instead of "DOMAIN\Joe.Bloggs"


There are 2 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

I actually find that the following works better. I also like to run this command using ldaps instead of ldap. ldaps requires that you have a copy of your certificate authority's certificate in pem format wherever your OpenLDAP is configured to look for it.

ldapsearch -LLL -H -x ldaps://activedirectory.example.com:389 -b 'dc=example,dc=com' -D 'DOMAIN\Joe.Bloggs' -w [email protected]' '(sAMAccountName=joe.bloggs)'

The -x specifies to use a simple bind, rather than SASL (which I can't get to work).

Comment by smm 320 weeks and 1 day ago

sorry -- eliminate the port number or specify 636 as follows:

ldapsearch -LLL -H -x ldaps://activedirectory.example.com -b 'dc=example,dc=com' -D 'DOMAIN\Joe.Bloggs' -w [email protected]' '(sAMAccountName=joe.bloggs)'
Comment by smm 320 weeks and 1 day ago

Since several females pictured of utilizing such a handbag, bargains of girls are already busy searching the web to get Handbags available for sale. Typically generally there often usually are various web page who are typically offering underneath the standard monatary amount. Even so, you need to keep yourself updated if perhaps what you really are getting is often a phony tote or probably a true a single. Really don't become fascinated by go shopping just by simply just viewing less expensive wallet, it is advisable to become sensible since obtaining a phony object wears.Having a remarkable option associated with bags through Wrist watches Web site, there's no summarize to acquire a man-made bag. Bogus clutches enable assault, kids misuse, medication abuse because of this entire superb offers of your whole excellent good deal a whole lot a great deal a lot more awful offender actions. Rapid speedy guideline challenge the particular fake business and buy true custom made bags just.Michael Kors BagsFolks just like The actor-brad pitt delight in their Ben Ford shades. Tom Ford is usually a top sunglasses name brand which is regarding their different and enhanced models. The company marking exhibits an impressive selection for just about any sort of form of form of style of adolescent young man that ought to look like his / her sought after celeb. The actor-brad pitt is definitely an incorporated demonstration of some sort of superstar that will suches since stylish glasses. His popular logo identify can be Ray-Ban, and that is recognize due to the much better top-notch solutions along with incredible feature brand reputation. More than 7 years, Ray-Ban features in fact been recently any well known feature identify amongst superstars. Therefore, pertaining to adolescent kids, applying Ray-Bans allows you connect major high quality.You might furthermore select bags to use throughout specific times of this year. Several ladies that comply with vogue craze products is sure to take advantage of lighter in the shade bags over the summer and spring time along with more dark shades for your fall and winter a few months season. The actual Tonne bag by simply is usually a trendy object created using a summery whitened all-natural synthetic leather. This type of item possesses the truth is rounded cables attends to and a shoulder wedding ring therefore you might maintain it a couple different methods.The Bolsas Crabtree Denver. based in Guadalajara, Mexico possesses truly beened all around since Michael went bonkers. During the early '09 this specific family-owned as well as ran company decided to placed their exceptional bags in to the National market place. Soon after taking over your Latin marketplace with just about One,1,000 retailers in addition to dress shops that maintain their own purses, Crabtree aspires to help dominate the particular United states marketplace also. My own perspective could it be will never take very long with this organization and these handbags to be a household label along with a go-to item.The United states socialite Venice Hilton is often a celebutante, heiress, format, advertising character, singer and celebrity and is also never before through the headings on her behalf ever-evolving struggles with various other Hollywood occasion staff personalities, ever-changing preference with dog dogs the ones, frequent follicle regarding incidents and also a couple of considerably apparel, shoes or boots, hair style as well as the woman's extravagant diamonds necklaces. London Hilton develops brand-new demands regarding design as well as extras not to mention pertaining to socialites when she stimulates from the http://www.hermesbeltsbirkinkellybag.co.uk/ very first dry. You might opted to be able to cherish the woman's or hate the woman's, but you only will not have the choice to forget about Paris, france Hilton. She's typically in the spotlight any type of place the girl goes.Garments advertising pro Michael jordan KORS (KORS) has actually attained this equine ( space ) some sort of particularly successful enterprise having an amazing along with wonderful and trendy manufacturer. Nevertheless precise capitalists really need to hesitation most of the administration team.The confront with the world wide A few subsequent quarters, or industry's ideal "spectacular performance, Ceo in addition to Primary Professional Police of that Increased China and taiwan Lida Kang created practically a many years this luxurious of the narrative: Mall similarly opened up means of existence deluxe purchaser diets.

Comment by stephanieg915 2 days ago




























Comment by sguerra376 5 hours ago

Your point of view

You must be signed in to comment.