Hide

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.
Hide

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:

Hide

News

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

Top Tags

Hide

Functions

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

Fill a hard drive with ones - like zero-fill, but the opposite :)

Terminal - Fill a hard drive with ones - like zero-fill, but the opposite :)
tr '\000' '\377' < /dev/zero | dd bs=512 count=200000 status=noxfer | pipebench | sudo dd of=/dev/sdx
2010-08-31 15:38:27
User: Gliktch
Functions: dd sudo tr
3
Fill a hard drive with ones - like zero-fill, but the opposite :)

Note: Replace 200000 with drive bytes/512, and /dev/sdx with the destination drive/partition. ;)

Note: You may need to install pipebench, this is easy with "sudo apt-get install pipebench" on Ubuntu.

The reason I hunted around for the pieces to make up this command is that I wanted to specifically flip all of the bits on a new HDD, before running an Extended SMART Self-Test (actually, the second pass, as I've already done one while factory-zeroed) to ensure there are no physical faults waiting to compromise my valuable data. There were several sites that came up in a Google search which had a zero-fill command with progress indicator, and one or two with a fill-with-ones command, but none that I could find with these two things combined (I had to shuffle around the dd command(s) to get this to happen without wasting speed on an md5sum as well).

For reference, these are the other useful-looking commands I found in my search:

Zero-fill drive "/dev/sdx", with progress indicator and md5 verification (run sudo fdisk -l to get total disk bytes, then divide by 512 and enter the resulting value into this command for a full wipe)

dd if=/dev/zero bs=512 count=<size/512> | pipebench | sudo tee /dev/sdx | md5sum

And this command for creating a file filled with ones is my other main source (besides the above command and man pages, that is - I may be a Linux newbie but I do read!):

tr '\000' '\377' < /dev/zero | dd of=allones bs=1024 count=2k

Hope someone finds this useful! :)

Cheers,

- Gliktch

Alternatives

There are 5 alternatives - vote for the best!

Terminal - Alternatives
perl -e '$s="$s\xFF" while length($s)<512; print $s while 1' | dd of=/dev/sdX

Know a better way?

If you can do better, submit your command here.

What others think

You're welcome. :)

http://pthree.org/2008/06/09/chalk-up-another-year/

Comment by atoponce 333 weeks and 4 days ago

As though a list involving factors was not superb ample the industry selling price within this bag will be $198.Double zero. This kind of bag can easily brighten right up almost any fall clothing. The retail price on this bag similarly causes it to be easily available for almost anyone. End up being advised, several of the Wall plug Shop Carriers can cost you roughly $3,1,000.Did you already know you may choose the similar certain timepieces on the web with a safe and sound purchasing pushcart as you're able buy with the stylish full price valuable bracelets store inside the retail center?A Balenciaga handbag is definitely an individual of the extremely identified soon after products in the trend earth. Every Balenciaga tote will be hand made by simply proficient Balenciaga builder and is also a particular obtain. A great deal of folks and girls, just like probably the most favored names on the planet, acquire Balenciaga handbag swiftly after keeping yourself using a prepared list for a short time. The particular quantity connected with enthrallment surrounding each brand-new Balenciaga handbag design and style starts which is getting developed because stylish whole spot are not able to delay until finally the release.This season's types come in any type of the particular MK's Extra-large Runway Wristwatch Observe, Brown, that is a modern-day modern day observe of which shouts modern. The switch is really a brown brushed timepiece in a large brown example with tonal in addition to bright features. The actual actually amounts are generally Arabic using bright baton tinted dog pens with the strange time. The three-dial cease observe function is actually came the ability that has a smaller day time windowpane between 4 and 5 o'clock situation. It truly is garnished with an appealing tan bracelets wedding band with an execution buckle. This specific http://www.hermesbeltsbirkinkellybag.co.uk/ observe definitely will be considered a sign on almost any palm.As of December 28, The year 2012, total stores 297 brand-new sites exposed in Sixty six. Simply by accepted events performs 91 retailers, on this the main throughout the world amount regarding 388 MK outlets.For an abundant seem, have a look at the Chronograph Two-tone Stainless Steel Enjoy. It features a silver-tone stainless-steel circumstance, triggered by way of a gold-tone frame along with gold-tone switch. It contains every day windowpane put between Some:00 in addition to Five:00, gold-tone fingers as well as gold-tone Persia persona in addition to list observing pens. This 8-inch extended pendant is equally amazing since the situation, produced from intertwining gold-tone and also silver-tone hyperlinks. It's run by a great Asian quartz movements and it is water-resistant to be able to 330 legs.Kors' equipment, in particular his / her bags, are becoming the significant craze amid women that have in fact constantly favored creator bags including Private coach, Dooney as well as Lauren, exceeding these throughout attraction.You may check out the value tags furthermore. Possibly some part you similar to, you might position a purchase order while using web site. You'll learn that purchasing on the net has many benefits. You are just required to click on the press button causing all of stuff that you really desire will certainly accomplish your physical location. Only for a bit total, you'll be able that you find the best connected with factors.

Comment by stephanieg915 5 days ago

Any circumstance, whether it be spiritual fairs, 1st birthdays, marriages, and so on. produces along with it cheerful ambience, meeting with buddies along with swapping items. When you're buying presents for your loved ones, you need something special that can tell these of yourself. Because you spend hours with searching out the suitable matter for every individual, it's possible how they might not enjoy it or may not put it to use. Just lately, the trend of using branded promotional items while presents has attained lots of acceptance.As a firm or even as a person, supplying personalized gifts to everyone during festivals really would http://www.hermesbeltsbirkinkellybag.co.uk/ assist you to talk with them better. In addition, these items are often custom-made, consequently, you should not spend time and effort throughout deciding on items for all. Also, they are excellent about the wallet, to help you give high quality offers affordable. Promotional bags have already been one of the most chosen methods of corporate and business merchandise and also presenting. Pointed out here are some ways in which you can use these kinds of bags intended for Xmas.For Organizations- Add some design and shades associated with Christmas time to your plastic-type material or perhaps papers bags an individual provide on your clients.- If you are planning to provide goodie bags in your clientele along with employees, make certain you make use of tough luggage which may have the company of your respective company personalized to complement the celebration.- Supplying a top quality carry bag on your customers with your marketing connection materials and Christmas items, will take the special offers another mile.- Recently bags using computer animated lighting and colours are incredibly preferred. Add you business logo and xmas images for many years and employ all of them since reveals.- Current a bag with intriguing information along with rates concerning the pageant and desires through your firm.For Individuals- Gift idea bags created from hand-made papers or perhaps textile as well as your photo using your friend or family member.- For those who have a big loved ones it's also possible to provide smaller pockets with simply the needs as well as identify about it.- For children you are able to give a smaller goodie bag shaped like a Without having Clause tote, along with your particular wants on their behalf.- Include a twist on the regular notebook computer as well as company bags by means of putting detachable Christmas time crafted key rings in addition to add-ons.- Found drawstring as well as duffle bags in addition to cards to add to the particular pageant of providing.Get exclusive custom made published bags by MARCO Promotional Products, along with rejoice the growing season regarding merriment.of MARCO Promotional Products

Comment by stephanieg915 5 days ago

www.canadagoosefemmehomme2016.fr/canada-goose-parka-langford_176.html

www.canadagoosefemmehomme2016.fr/canada-goose-chateau-homme_296.html

www.canadagoosefemmehomme2016.fr/canada-goose-a-montreal_306.html

www.canadagoosefemmehomme2016.fr/veste-style-canada-goose_223.html

www.canadagoosefemmehomme2016.fr/canada-goose-vs-pjs_443.html

www.canadagoosefemmehomme2016.fr/site-officiel-canada-goose_432.html

www.canadagoosefemmehomme2016.fr/lodge-hoody-canada-goose_133.html

www.canadagoosefemmehomme2016.fr/kensington-parka-canada-goose_257.html

www.canadagoosefemmehomme2016.fr/blouson-canada-goose_156.html

www.canadagoosefemmehomme2016.fr/parka-canada-goose-langford_425.html

www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

www.canadagoosefemmehomme2016.fr/foxe-bomber-canada-goose_392.html

www.canadagoosefemmehomme2016.fr/canada-goose-ou-parajumpers_414.html

www.canadagoosefemmehomme2016.fr/canada-goose-style_105.html

www.canadagoosefemmehomme2016.fr/canada-goose-destockage_165.html

www.canadagoosefemmehomme2016.fr/comment-reconnaitre-une-canada-goose_478.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-longue-femme_272.html

www.canadagoosefemmehomme2016.fr/vente-doudoune-canada-goose-femme_197.html

www.canadagoosefemmehomme2016.fr/parka-homme-canada-goose_84.html

www.canadagoosefemmehomme2016.fr/goose-canada-pas-cher_140.html

www.canadagoosefemmehomme2016.fr/canada-goose-fourrure-amovible_71.html

www.canadagoosefemmehomme2016.fr/canada-goose-paris-magasin_420.html

www.canadagoosefemmehomme2016.fr/canada-goose-blouson-aviateur-chilliwack-homme_321.html

www.canadagoosefemmehomme2016.fr/canada-goose-ottawa_412.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-parka_81.html

Comment by sguerra376 3 days ago

www.canadagoosefemmehomme2016.fr/canada-goose-inc_430.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello_383.html

www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-plusieurs-fois_152.html

www.canadagoosefemmehomme2016.fr/canada-goose-au-canada-prix_54.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-femme_191.html

www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

www.canadagoosefemmehomme2016.fr/parka-expedition-canada-goose_452.html

www.canadagoosefemmehomme2016.fr/canada-goose-prix_56.html

www.canadagoosefemmehomme2016.fr/canada-goose-veste-femme_363.html

www.canadagoosefemmehomme2016.fr/canada-goose-mystique-femme_179.html

www.canadagoosefemmehomme2016.fr/heatherton-canada-goose_484.html

www.canadagoosefemmehomme2016.fr/canada-goose-ca_288.html

www.canadagoosefemmehomme2016.fr/canada-gooser_220.html

www.canadagoosefemmehomme2016.fr/canada-goose-victoria-parka_462.html

www.canadagoosefemmehomme2016.fr/doudoune-goose-canada_292.html

www.canadagoosefemmehomme2016.fr/canada-goose-rennes_423.html

www.canadagoosefemmehomme2016.fr/langford-canada-goose_290.html

www.canadagoosefemmehomme2016.fr/canada-goose-montebello-noir_170.html

www.canadagoosefemmehomme2016.fr/parka-citadel-canada-goose_253.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber-femme_458.html

www.canadagoosefemmehomme2016.fr/blouson-canada-goose-femme_143.html

www.canadagoosefemmehomme2016.fr/manteau-femme-canada-goose_248.html

www.canadagoosefemmehomme2016.fr/canada-goose-homme-prix_329.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-prix_231.html

Comment by sguerra376 1 day ago

http://www.canadagoosefemmehomme2016.fr/doudoune-canadian-goose_205.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-��-paris_227.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-magasin-paris_280.html

http://www.canadagoosefemmehomme2016.fr/chilliwack-bomber-canada-goose_372.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-toronto-outlet_483.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-rabais_88.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-grise-homme_468.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-jogging_460.html

http://www.canadagoosefemmehomme2016.fr/ou-acheter-canada-goose-en-france_308.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-graphite_389.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-sans-fourrure_311.html

http://www.canadagoosefemmehomme2016.fr/trillium-parka-canada-goose_108.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-taille-xs_224.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber_273.html

http://www.canadagoosefemmehomme2016.fr/manteau-canada-goose_433.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-trillium_454.html

http://www.canadagoosefemmehomme2016.fr/yorkville-canada-goose_463.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-whistler_318.html

http://www.canadagoosefemmehomme2016.fr/ou-acheter-une-doudoune-canada-goose_348.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-bordeaux_397.html

http://www.canadagoosefemmehomme2016.fr/taille-canada-goose_79.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-resolute_66.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-snow-mantra_209.html

Comment by sguerra376 1 day ago

http://www.canadagoosefemmehomme2016.fr/canada-goose-montpellier_353.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-promo_172.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-achat_221.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chelsea_326.html

http://www.canadagoosefemmehomme2016.fr/leboncoin-canada-goose_481.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-femme-chilliwack_113.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-accessoires_183.html

http://www.canadagoosefemmehomme2016.fr/nouvelle-canada-goose_193.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose_330.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-style_105.html

http://www.canadagoosefemmehomme2016.fr/manitoba-canada-goose_482.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-blanc_171.html

http://www.canadagoosefemmehomme2016.fr/pas-cher-canadian-goose_219.html

http://www.canadagoosefemmehomme2016.fr/parajumpers-canada-goose_203.html

http://www.canadagoosefemmehomme2016.fr/site-officiel-de-canada-goose_435.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-solde_316.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-parka-expedition-homme_355.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-ou-parajumpers_414.html

http://www.canadagoosefemmehomme2016.fr/revendeur-canada-goose_106.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-bomber-chilliwack_119.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-rouge_118.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-france-site-officiel_307.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-canada_386.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber-pas-cher_465.html

Comment by sguerra376 1 day ago

http://www.canadagoosefemmehomme2016.fr/ontario-canada-goose_96.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-enfant_337.html

http://www.canadagoosefemmehomme2016.fr/selkirk-canada-goose_77.html

http://www.canadagoosefemmehomme2016.fr/mystique-parka-canada-goose_229.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-rouge_118.html

http://www.canadagoosefemmehomme2016.fr/vrai-canada-goose-pas-cher_40.html

http://www.canadagoosefemmehomme2016.fr/parajumpers-ou-canada-goose_87.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-huron-bomber_437.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-fille_319.html

http://www.canadagoosefemmehomme2016.fr/promo-canada-goose_263.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-payer-en-plusieurs-fois_152.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-mystique-femme_179.html

http://www.canadagoosefemmehomme2016.fr/manteau-femme-canada-goose_248.html

http://www.canadagoosefemmehomme2016.fr/heatherton-canada-goose_484.html

http://www.canadagoosefemmehomme2016.fr/branta-canada-goose_271.html

http://www.canadagoosefemmehomme2016.fr/veste-canada-goose-solde_198.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pbi_252.html

http://www.canadagoosefemmehomme2016.fr/parka-citadel-canada-goose_253.html

http://www.canadagoosefemmehomme2016.fr/gilets-canada-goose_370.html

http://www.canadagoosefemmehomme2016.fr/veste-de-ski-canada-goose_162.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-magasin-paris_280.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-pas-cher-femme_305.html

http://www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-solde_316.html

http://www.canadagoosefemmehomme2016.fr/canada-goose-grenoble_340.html

Comment by sguerra376 1 day ago

www.canadagoosefemmehomme2016.fr/revendeur-canada-goose-france_401.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-pour-femme_475.html

www.canadagoosefemmehomme2016.fr/canada-goose-parka-expedition-homme_355.html

www.canadagoosefemmehomme2016.fr/le-bon-coin-canada-goose_157.html

www.canadagoosefemmehomme2016.fr/chilliwack-canada-goose_485.html

www.canadagoosefemmehomme2016.fr/canada-goose-chateau-pas-cher_173.html

www.canadagoosefemmehomme2016.fr/site-canada-goose_352.html

www.canadagoosefemmehomme2016.fr/canada-goose-parka-montebello_317.html

www.canadagoosefemmehomme2016.fr/canada-goose-victoria_293.html

www.canadagoosefemmehomme2016.fr/prix-canada-goose_398.html

www.canadagoosefemmehomme2016.fr/canada-goose-montpellier_353.html

www.canadagoosefemmehomme2016.fr/canada-goose-parajumpers_49.html

www.canadagoosefemmehomme2016.fr/canada-goose-mystique-femme_179.html

www.canadagoosefemmehomme2016.fr/canada-goose-promo_172.html

www.canadagoosefemmehomme2016.fr/canada-goose-prix-usa_359.html

www.canadagoosefemmehomme2016.fr/canada-goose-suisse-prix_276.html

www.canadagoosefemmehomme2016.fr/point-de-vente-canada-goose_304.html

www.canadagoosefemmehomme2016.fr/canada-goose-chilliwack-bomber-pas-cher_465.html

www.canadagoosefemmehomme2016.fr/canada-goose-blouson-aviateur-chilliwack-homme_321.html

www.canadagoosefemmehomme2016.fr/canada-goose-femme-pas-cher_139.html

www.canadagoosefemmehomme2016.fr/homme-canadian-goose_180.html

www.canadagoosefemmehomme2016.fr/canada-goose-fabrication_275.html

www.canadagoosefemmehomme2016.fr/canada-goose-noir_45.html

www.canadagoosefemmehomme2016.fr/doudoune-canada-goose-montebello-femme_128.html

www.canadagoosefemmehomme2016.fr/manteau-canada-goose-homme_279.html

www.canadagoosefemmehomme2016.fr/borden-canada-goose_442.html

Comment by sguerra376 16 hours ago

Your point of view

You must be signed in to comment.