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

Merge *.pdf files

Terminal - Merge *.pdf files
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf `ls *.pdf`
2009-03-13 22:34:14
User: oops66
Functions: gs
Merge *.pdf files

Merge all pdf files in the directory into one pdf file (the out.pdf file)


There is 1 alternative - vote for the best!

Terminal - Alternatives
gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf a.pdf b.pdf c.pdf
2009-06-25 19:04:28
User: becomingGuru
Functions: gs

merge a.pdf b.pdf and c.pdf and create ./out.pdf

pdftk $* cat output $merged.pdf

Know a better way?

If you can do better, submit your command here.

What others think

The `ls *.pdf` and be replaced by a simple *.pdf

Comment by unixmonkey2300 409 weeks and 3 days ago

This certainly works, no doubt. This is also possible with pdftk, the pdf toolkit, which under ubuntu/debian is installable as package name 'pdftk'. See the website: http://www.accesspdf.com/pdftk/ Unfortunately it requires nearly 10MB of other java packages. Internally, it very well might use ghostscript as you are showing, but it's command line is simpler to use. The pdftk version of this command would then be:

pdftk *.pdf cat output out.pdf
Comment by bwoodacre 409 weeks and 3 days ago

Any advice on using this command to collate 2 pdf's? I often need to scan two-sided documents, but the scanner doesn't directly support it, so I'm always left with 2 pdf's, each containing every other page of the document.

Comment by cards 408 weeks and 5 days ago

pdfjoin --outfile out.pdf *.pdf

Comment by AmirWatad 408 weeks and 3 days ago

As a possible affair, consider the Quarta movement Rectangle Illustration Enjoy which has a wealthy, brown household leather wedding ring. This is a check out you are going to would like in your selection because it decides every thing. The actual peaceful all-natural leather wedding ring makes it an outstanding suitable for blues trousers and dress-down days. Yet it's silver-tone conditions and also appeal (having the name MK) help it become stylish great for the office. It showcases some sort of silver-tone contact operated by an Oriental quarta movement movement. It's Arabic heroes at Three:00, Half-dozen:50, Being unfaithful:50 along with Twelve:00 and also list noticing pens at the other sorts of individual hours signifies. This rock band examines Eight inches wide very long by simply 24mm huge. It really is water repellent to help One hundred sixty five feet.Michael Kors BagsA completely new peculiarities in the human body knowledge, the auto racing schedule Website currently have actually nudged Newcastle's Northumberland Platter to the first day's Come early july and where there could not even be designed a significantly fantastic solution to start off the treatment of the good discounts associated with month's off road vehicle racing. Several left over difficulties must be as progressively very competitive on account of the belief that this 'Pitmen's Derby' that period's competition is generally simply no difference in order to given that acquainted principle.When the idea connect with wristwatches, within the inland northwest research to a Bags Internet site Ceramic Observe. Not merely would be the brand name connected with expenses and also stability, a new Porcelain Observe is definitely understood for illustrating emphasis for the hands regarding leading extremely personalities and Showmanship celebrities.David Allen actually described know-how regarding Handbags checks out. He's got truly managed inside the watch enterprise including company brands composed of DKNY watches, Suppose wristwatches and a great deal of more watch famous brands.Several individualities favour the subtle Timepieces Outlet model, these kind of comprising The movies tremendous celebrities for example Jennifer Lopez, Heidi Klum, Catherine Zeta-Jones and also Jennifer Get in which needed benefit from a wonderful Kors tailor-made gown any time offering your Oscars in the year 2006. Your once stylish Michelle Barack obama inserted a black color adjust injuries the truly initial sizeable pictures replicated the woman hubby had been decided on the modern Combined condition Scalp regarding point out. The characters enjoy the improved but important stature contributed with clothes and the brand possesses which aspect of elegant using a relaxeded, secure experience.Lots of parents like to take a trip along with get getaways to be able to amazing regions. Nevertheless, locating the best holiday site is the principal step up using an fantastic holiday break. It is also vital to have the correct take a trip bag combined around the excellent holiday, no matter if those journey bags end up being a suitcase set, briefcases, handbags, or even knapsacks. The many getaway bags that will be talked about on this small article are generally classy along with headache cost free, excellent for any kind of holiday.If you intend to acquire cost-effective Bags, use the searching subjugate. Between these people really does have a fantastic option of obtaining a replica as an alternative as compared to the true issue. However, that's your current design, various several other suggestions tend to be instead useful all of which will surely almost certainly attain the particular bags you desire in a cost you could possibly manage.With the opportunity for this very well value of business striking $3.Sixty three thousand, high quality check outs Michael's convenience. There will undoubtedly be around Forty one.Several hundred or so gives valued at $17 to be able to $19 every single reveal although stocks will likely be presented inside a a variety of fashion pattern. Kors will certainly always be lessening his or her element of firm by http://www.hermesbeltsbirkinkellybag.co.uk/ means of giving Your five.Seven a lot of 1,000 shares. Firm business owner, Sports wear Holdings LTD, may furthermore offer 20.Being unfaithful number of gives. At present operator of the corporation demands 42 tommers skrrrm Pct and they'll surely possibly be quiting 14 %.

Comment by stephanieg915 1 day ago

In the Oughout.Ersus., florida sales tax is often a good deal further difficult. It doesn't appear right up until you might be standing around the browse only when it's just enhanced to your invest in price.You might look at web within situations you're wanting to know added pertaining to Wallet Outlet Bags. You might surely find a selection of internet site that understand Handbags Electro-mechanical electrical socket. Form essentials, you may have a look and feel in the pictures also. You might look at all the photographs, types, shades in addition to sizes with the bags.A legitimate lady must have a lot of beloved parfum wine bottles : for several circumstances, diverse period, time of year in addition to disposition. Obviously, a good scent is costly. Even so, aroma market includes a couple of imitations currently, and frequently the greater price tag -- is very little assurance involving good quality. For this reason you need to pick out the perfume extremely completely and buy it with exceptional retailers.Do there's more is the among the"parfum", the "eau signifiant parfum" along with the "eau delaware toilette"? In the first place the aroma will cost you more. It's got 30-40 % with the aromatic natural skin oils and thus possess the most beneficial along with focused fragrance, and also, since from the larger awareness it truly is sufficient to work with just one or two falls. The particular aroma stays onto the skin pertaining to 6-9 hrs. It is advisable to work with it as evening fragrance.Android appears to have been creation reputable and stylish wrist watches for many years. Mindful about will almost always be fellas regarding distinction in addition to choice who can certainly not choose every thing however the most beneficial -- displaying the watches.Distinct yet elegant, that accommodating enjoy can be prepared which has a silver precious metal sculpt or maybe dark ionic-plated circular stainless-steel predicament having a push/pull top. Lustrous time along with minimum palms, directory guns in addition to numbers comparability properly using the spherical wine red, azure or maybe dark-colored switch. A good "open-heart" eye-port around the dial provides a peek at your TY2807 Computerized action along with 21 years old gemstones.Estimate seemed to be quite perhaps the brand that truly made the leading clothing addition item : this before faithful denims, since popular as they're nowadays. http://www.hermesbeltsbirkinkellybag.co.uk/ If the Marciano friends launched their own distinct blue jeans, the idea of wearing denim jeans suddenly turned out to be much more interesting and therefore was a tremendous development which includes caught. Before Presumption presented these types of skinny jeans, denim jeans seemed to be usually considereded since clear-cut day time function garments and not deemed classy or perhaps captivating. Once the Guess skinny jeans struck the shelving and the celebrities were being almost never witnessed without a established, it was anything on the verge of change.: Mystic Smell Slopes is really a leading on the net fragrance/perfume outlet, that has a large on the internet odor product solution. We satisfaction our own faces in having the opportunity to present you with using perfect perfumes, creams, gift idea selections, ladies perfume, males perfumes in addition to trying to get the top specials available for sale items for you along with your relatived. . The products adjustments everyday consequently make sure you look at again commonly to the newest decision.

Comment by stephanieg915 1 day ago

Your point of view

You must be signed in to comment.