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.

UpGuard checks and validates configurations for every major OS, network device, and cloud provider.
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

Btrfs: Find file names with checksum errors

Terminal - Btrfs: Find file names with checksum errors
dmesg | grep -Po 'csum failed ino\S* \d+' | sort | uniq | xargs -n 3 find / -inum 2> /dev/null
2014-03-20 06:27:15
User: Sepero
Functions: dmesg find grep sort uniq xargs
-1
Btrfs: Find file names with checksum errors

Btrfs reports the inode numbers of files with failed checksums. Use `find` to lookup the file names of those inodes.

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives
dmesg | grep -Po 'csum failed ino\S* \d+' | awk '{print $4}' | sort -u | xargs -n 1 find / -inum 2> /dev/null
2014-03-22 12:22:46
User: Sepero
Functions: awk dmesg find grep sort xargs
Tags: find inode btrfs
1

Btrfs reports the inode numbers of files with failed checksums. Use `find` to lookup the file names of those inodes. The files may need to be deleted and replaced with backups.

grep "btrfs: checksum error at logical" /var/log/messages | egrep -o "[^ ]+$" | tr -d ')' | sort | uniq
2014-07-01 08:15:26
User: jcoll
Functions: egrep grep sort tr
0

Filter entries in OpenSuse /var/log/messages like:

timestamp servername kernel: [83242.108090] btrfs: checksum error at logical 1592344576 on dev /dev/sda5, sector 5223584, root 5, inode 2652, offset 282624, length 4096, links 1 (path: log/warn)

echo "btrfs checksum error(s) on: " && grep "btrfs: checksum error at logical" /var/log/messages | sed -e 's/^.*\( dev .*\)\(, sector.*\)\(path\: .*\))/\t\1, \3/' | sort | uniq
2014-07-01 08:56:05
User: jcoll
Functions: echo grep sed sort
0

btrfs checksum errors console report.

Know a better way?

If you can do better, submit your command here.

What others think

Er... I don't have a damage btrfs filesystem to hand, but surely that command can't work.

grep is going to output sets of four "words", e.g.

csum failed ino 1234

csum failed ino 5678

You want to extract just the number (but you don't).

Next, sort and uniq (sort -u would be more efficient).

Then you "xargs -n3" to find. find can only take one parameter to -inum.

Therefore most calls to find will fail.

I'd change the command to:

dmesg | grep -Po 'csum failed ino\S* \d+' | awk '{print $4}' | sort -u | xargs -n 1 find / -inum 2> /dev/null
Comment by flatcap 187 weeks and 3 days ago

@flatcap

I had a Btrfs with corrupted files, so indeed it did work, but perhaps it wasn't portable? In my usage, the "xargs -n3" made it chop off all but the 4th argument (inode number). I have little experience with xargs. Anyway, I posted your suggestion as an alternative because I like it also.

Comment by Sepero 187 weeks and 1 day ago

@flatcap

Perhaps this output on my system explains it, and all errors from the original command were simply redirected to /dev/null.

$ echo "1 2 3 4" | xargs -n3 echo

1 2 3

4

Comment by Sepero 187 weeks and 1 day ago

http://www.michaelkors-handbags.in.net

http://www.canadagoosejacketssale.us.com

http://www.cheapraybans-sunglasses.us.com

http://www.michaelkorsoutletofficials.us.com

http://www.christian-louboutinoutlet.us.org

http://www.christianlouboutin.com.co

http://www.ralphlaurenpoloshirts.me.uk

http://www.lacosteoutlet.us.org

http://www.adidasshoes.us.org

http://www.coachfactoryoutletonlinestores.us.com

http://www.ralph-laurenpolooutlet.us.com

http://www.mont-blancpens.us.com

http://www.michaelkorsoutletclearancee.us.com

http://www.fitflopsaleclearance.us.com

http://www.polooutlet.name

http://www.coachfactoryoutletofficials.us.com

http://www.raybansunglassesformen.us.com

http://www.mbtshoesoutlets.us.com

http://www.oakley-sunglassesoutletonline.us.com

http://www.nikeshoes.com.co

http://www.cheapuggboots.name

http://www.cheapuggboots.org

http://www.raybansun-glasses.com.co

http://www.fredperry.org.uk

http://www.ralphlaurenpolo-uk.org.uk

http://www.valentinooutlet.in.net

http://www.polooutletralphlauren.us.com

http://www.oakleysunglasseswholesaler.us.com

http://www.montblancpensoutlet.com

http://www.ralphlauren-polo.me.uk

http://www.yeezyboost350-v2.us.com

http://www.mcmoutletonline.us

http://raybansunglasses.co-sunglasses.com

http://nikeshoes.nike-com.com

http://www.oakley-sunglassesclearance.us.com

http://www.truereligionjeanss.us.com

http://www.pandoraoutlets.us.com

http://www.montblancpens-outlet.us.com

http://www.lunetterayban.fr

http://www.airjordan4.us

http://www.canadagooseoutlet-store.com.co

http://www.adidasnmd-r1.us.com

http://www.truereligionjeans-sale.us.com

http://www.mlbjerseys.net

http://www.adidasyeezyshoes.name

http://www.poloralphlaurenfactorystore.us.com

http://www.cheapjordans.name

http://www.edhardyclothing.us.com

http://www.michaelkorsoutletclearancehandbags.us.com

http://www.polo-ralphlaurenuk.me.uk

http://www.fitflops-saleclearance.us

http://www.cheapmlb-jerseys.us

http://www.nikeshoesoutlet.us.com

http://polooutlet.amegov.com

http://www.katespadeshandbags.us

http://www.ralphlauren-outletuk.org.uk

http://www.canadagoose.name

http://www.ralph-laurenoutletuk.me.uk

http://www.ralphlaurenoutlets.org.uk

http://www.michaelkorsoutlet-online.in.net

http://www.fredperrypoloshirts.co.uk

http://www.kate-spadeoutlet.us.org

http://www.nike-shoes.us.com

http://www.truereligion-outletstore.us.com

http://www.polo-ralphlauren-pascher.fr

http://www.poloralphlauren-uk.me.uk

http://www.mbtshoescheap.us.com

http://www.pradaoutletstore.us

http://www.pradaoutlet-store.us.com

http://poloralphlauren.amegov.com

http://www.true-religionoutletstore.us.com

http://www.lebron-jamesshoes.us.com

http://www.cheapuggs.name

http://www.michaelkorsoutlet-clearance.org

http://www.oakleysunglasseswholesales.us.com

http://www.michaelkorsoutlet-clearances.us.com

http://adidasyeezyshoes.adidassale.net

http://www.pandorajewelry-outlet.us.com

http://www.katespadeoutlet-store.us.com

http://www.longchampoutlet.us.org

http://www.nikeoutlet.com.co

http://www.oakleysunglasseswholesalee.us.com

http://www.oakleysunglassescheaps.us.com

http://www.fredperryoutlet.us.com

http://www.longchampoutletofficial.us.com

http://www.coachfactory-outlet.eu.com

http://www.adidasoutlet.com.co

http://www.asicsrunningshoes.us.com

http://www.coach-outletonlineclearance.us.com

http://www.christianlouboutin-uk.org.uk

http://www.oakleysunglassesformen.us.com

http://www.nhljerseyss.us.com

http://cheapraybansunglasses.co-sunglasses.com

http://www.coachfactoryoutletmiami.us.com

http://www.coachoutletcoachoutletstore.us.com

http://www.adidasoutlet.us.org

http://www.cheapjordansfor-sale.us.com

http://www.michaelkorsoutletofficial.com

http://www.hermesbeltsoutlet.us.com

http://www.pandoraoutletstore.us.com

http://www.michaelkorsoutlet-clearance.us

http://www.ralphlauren-shirts.org.uk

http://www.ralphlaurenoutletonlinestore.us.com

http://www.ralphlaurenofficial.us.com

http://www.michael-korshandbags.in.net

http://www.michaelkorsoutletonlinestore.us.org

http://www.oakleysunglassesfactory.us.com

http://www.polooutlet.us.org

http://www.raybanssun-glasses.com.co

http://www.coachoutletonlinecoachfactoryoutlets.us.com

http://www.michaelkorssoutletclearance.us.com

http://www.poloralphlauren-uk.org.uk

http://nikeshoes.up-nike.com

http://www.poloralph-laurenuk.co.uk

http://www.michael-korsoutletstore.in.net

http://www.coachfactoryoutlet-coachoutlet.us.com

http://www.canadagoosejacketss.com.co

http://www.christian-louboutinshoes.us

http://www.coach-outletonlinecoachfactoryoutlet.us.com

http://www.cheapnfljerseys.eu.com

http://www.mlbjerseys-wholesale.us.com

http://www.adidasyeezy-shoes.us.com

http://www.nike-shoes.us.org

http://www.valentino-outlet.us.com

http://www.ralph-laurenpolo.us.org

http://www.raybansunglassesonsale90off.us.com

http://www.fitflopssaleclearance.name

http://www.coachoutletcoachfactoryoutlets.us.com

http://www.airjordan.us.org

http://www.canadagoose-outlets.com.co

http://raybansunglassesoutlet.co-sunglasses.com

http://www.uggoutlet.name

http://www.oakleysunglassesss.us.com

http://www.canadagooses.com.co

http://www.ralphlaurenshirts.me.uk

http://www.michaelkorsoutlet-clearance.com

http://www.cheapjordans-forsale.us.com

http://www.oakleysunglasseswholesaleonline.us.com

http://www.coachoutletonlinecoachfactoryoutlet.com.co

http://www.kate-spadeoutletstore.us.com

http://www.nbajerseyss.us.com

http://yeezyboost.adidassale.net

http://www.nikeoutletstorelocations.com

http://www.montblancpenss.com.co

http://www.pandorajewelrycharms.us.com

http://www.mulberryhandbagsuk.co.uk

http://www.hermesbirkins.us.com

http://www.coachoutlet-clearance.us.org

chenlili20170503

Comment by chenyingying 24 weeks and 4 days ago

The http://www.huaracherunpas-cher.fr/huarache-noir-et-blanc_96.html workplace associated http://www.huaracherunpas-cher.fr/nike-huarache-agassi_133.html with employees differs according to http://www.huaracherunpas-cher.fr/nouvelle-nike-huarache_82.html the business and http://www.huaracherunpas-cher.fr/nike-air-huarache-mid_78.html kind at work executed. http://www.huaracherunpas-cher.fr/nike-huarache-ultramarine_125.html It http://www.huaracherunpas-cher.fr/nike-air-max-huarache-hybrid_121.html does not http://www.huaracherunpas-cher.fr/nike-air-huarache-og_162.html take business employers liability http://www.huaracherunpas-cher.fr/chaussures-air-huarache_128.html to give a safe http://www.huaracherunpas-cher.fr/huarache-free-run_145.html and sound atmosphere as http://www.huaracherunpas-cher.fr/nike-air-huarache-beige_112.html well http://www.huaracherunpas-cher.fr/nike-huarache-free-run-2012_146.html as protective equipment to http://www.huaracherunpas-cher.fr/basket-huarache_63.html the personnel. http://www.huaracherunpas-cher.fr/huarache-femmes_170.html Risk to safety http://www.huaracherunpas-cher.fr/nike-air-force-1-huarache_113.html evaluation at work can http://www.huaracherunpas-cher.fr/nike-air-huarache-run-chaussures_174.html provide you with http://www.huaracherunpas-cher.fr/nike-huarache-light-og_115.html the http://www.huaracherunpas-cher.fr/air-flight-huarache_68.html suitable safety equipment. Selecting http://www.huaracherunpas-cher.fr/nike-huarache-safari_52.html the Right PPEPPE http://www.huaracherunpas-cher.fr/huarache-air-max_163.html guards staff from http://www.huaracherunpas-cher.fr/nike-huarache-violet_54.html revealed dangers. http://www.huaracherunpas-cher.fr/nike-air-huarache-original_144.html This implies it really is http://www.huaracherunpas-cher.fr/basket-nike-huarache_45.html indispensible to http://www.huaracherunpas-cher.fr/huarache-usa_100.html possess threat review http://www.huaracherunpas-cher.fr/nike-huarache-free-light_134.html with the business office so http://www.huaracherunpas-cher.fr/huarache-og_183.html http://www.huaracherunpas-cher.fr/huarache-beige_106.html that the proper PPE can http://www.huaracherunpas-cher.fr/nike-huarache-2_166.html be furnished. Top quality http://www.huaracherunpas-cher.fr/nike-air-huarache-pas-chere_161.html basic safety machines http://www.huaracherunpas-cher.fr/huarache-nike-blanche_127.html http://www.huaracherunpas-cher.fr/nike-air-zoom-huarache_89.html are required for http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine_64.html all sorts of sectors. It http://www.huaracherunpas-cher.fr/huarache-chaussures_95.html really is http://www.huaracherunpas-cher.fr/nikeair-huarache_88.html required to use http://www.huaracherunpas-cher.fr/nike-air-huarache-run_43.html defensive accommodates, coveralls, brain http://www.huaracherunpas-cher.fr/nike-huarache-premium_126.html as well http://www.huaracherunpas-cher.fr/huarache-enfant_62.html as safety http://www.huaracherunpas-cher.fr/nike-air-huarache-light_168.html gloves gear and other add-ons http://www.huaracherunpas-cher.fr/nike-huarache-paris_69.html good needs on http://www.huaracherunpas-cher.fr/nike-huarache-chaussures_129.html the do the http://www.huaracherunpas-cher.fr/nike-air-huarache-blanc_41.html job.The appropriateness http://www.huaracherunpas-cher.fr/nike-air-huarache-2_92.html of personal protective equipment http://www.huaracherunpas-cher.fr/chaussure-air-huarache_180.html and also http://www.huaracherunpas-cher.fr/nike-air-huarache-light-pas-cher_44.html the amount of safeguard http://www.huaracherunpas-cher.fr/nike-huarache-pour-femme_155.html should http://www.huaracherunpas-cher.fr/chaussure-nike-air-huarache_76.html be thought about though http://www.huaracherunpas-cher.fr/nike-huarache-1991_55.html selecting the equipment; it http://www.huaracherunpas-cher.fr/nike-air-huarache-safari_73.html must go with the http://www.huaracherunpas-cher.fr/achat-nike-huarache_137.html health risks http://www.huaracherunpas-cher.fr/nike-huarache-magenta_51.html concerned. At times http://www.huaracherunpas-cher.fr/nike-huarache-prix_66.html multiple safeguard products http://www.huaracherunpas-cher.fr/nike-air-huarache-retro_70.html may http://www.huaracherunpas-cher.fr/huarache-noir-femme_60.html be essential; for example, http://www.huaracherunpas-cher.fr/huarache-chaussure_122.html welding helmet, respirator, goggles http://www.huaracherunpas-cher.fr/huarache-acheter_83.html as well as a http://www.huaracherunpas-cher.fr/air-huarache-paris_138.html lid. Receive advice http://www.huaracherunpas-cher.fr/huarache-2017_99.html coming from http://www.huaracherunpas-cher.fr/nike-air-huarache-chaussures_80.html specialists and http://www.huaracherunpas-cher.fr/huarache-run_132.html try out the gear http://www.huaracherunpas-cher.fr/air-huarache-femme_90.html prior to the buy. http://www.huaracherunpas-cher.fr/nike-huarache-jd_46.html Not to http://www.huaracherunpas-cher.fr/nike-air-huarache-homme_150.html mention http://www.huaracherunpas-cher.fr/chaussure-huarache-nike_173.html best to obtain the http://www.huaracherunpas-cher.fr/nike-air-huarache-solde_181.html individuals involved in the http://www.huaracherunpas-cher.fr/nike-huarache_93.html collection. A number http://www.huaracherunpas-cher.fr/huarache-noir_86.html of models may http://www.huaracherunpas-cher.fr/nike-huarache-blanc_85.html be http://www.huaracherunpas-cher.fr/boutique-nike-huarache_151.html used for tests; person http://www.huaracherunpas-cher.fr/nike-huarache-toute-noir_154.html choices like private http://www.huaracherunpas-cher.fr/nike-huarache-id_164.html ease mustn't be http://www.huaracherunpas-cher.fr/nike-huarache-fille_148.html pushed aside. Lastly, assess http://www.huaracherunpas-cher.fr/nike-air-huarache-prix_120.html cost factors http://www.huaracherunpas-cher.fr/ in addition to personal fitting.Goliath http://www.huaracherunpas-cher.fr/huarache-light-og_105.html Shoes http://www.huaracherunpas-cher.fr/air-huarache-grise_142.html regarding SafetySafety shoe have numerous http://www.huaracherunpas-cher.fr/air-huarache-light_139.html kinds; http://www.huaracherunpas-cher.fr/nike-huarache-free-run-pas-cher_156.html generally, these http://www.huaracherunpas-cher.fr/nike-huarache-taille_49.html are made from lighting products for http://www.huaracherunpas-cher.fr/air-huarache-noir_116.html straightforward http://www.huaracherunpas-cher.fr/acheter-huarache_84.html movements and luxury. The http://www.huaracherunpas-cher.fr/air-huarache-run_157.html intention of http://www.huaracherunpas-cher.fr/air-huarache-og_71.html safety shoe would be http://www.huaracherunpas-cher.fr/air-huarache-homme_67.html to present http://www.huaracherunpas-cher.fr/nike-huarache-homme_141.html perfect safety. Dewalt http://www.huaracherunpas-cher.fr/nike-air-huarache-noir_97.html security shoe are http://www.huaracherunpas-cher.fr/nike-huarache-leopard_57.html accommodating, supplies http://www.huaracherunpas-cher.fr/huarache-vintage_42.html range of motion in http://www.huaracherunpas-cher.fr/huarache-instagram_169.html addition to total safety. http://www.huaracherunpas-cher.fr/chaussures-huarache_56.html Goliath shoes http://www.huaracherunpas-cher.fr/huarache-bleu_111.html usually are a different http://www.huaracherunpas-cher.fr/air-huarache-nike_87.html type of safety http://www.huaracherunpas-cher.fr/nike-id-huarache_158.html shoe this is http://www.huaracherunpas-cher.fr/nike-air-huarache-light-ultramarine-og_75.html not http://www.huaracherunpas-cher.fr/nike-huarache-marron_165.html only at ease but really http://www.huaracherunpas-cher.fr/nike-air-huarache-international_104.html long http://www.huaracherunpas-cher.fr/huarache-noir-et-rose_109.html lasting. The actual twice http://www.huaracherunpas-cher.fr/nike-huarache-solde_94.html thickness soles regarding http://www.huaracherunpas-cher.fr/nike-air-huarache-taille_172.html plastic provide you with the http://www.huaracherunpas-cher.fr/huarrache-blanche_135.html toughness. You http://www.huaracherunpas-cher.fr/nike-huarache-usa_114.html will find a http://www.huaracherunpas-cher.fr/air-max-huarache_39.html mid-layer associated http://www.huaracherunpas-cher.fr/nike-air-huarache-og-retro_101.html with reduced density coupled http://www.huaracherunpas-cher.fr/nike-air-huarache-run-pas-cher_98.html to the http://www.huaracherunpas-cher.fr/nike-air-huarache-blanche_153.html outdoor covering which make http://www.huaracherunpas-cher.fr/nike-air-flight-huarache-og_48.html it http://www.huaracherunpas-cher.fr/air-huarache-noire_117.html light and portable and http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-rose_58.html provides for a http://www.huaracherunpas-cher.fr/nike-huarache-noir-et-bleu_130.html distress moisture resistant. First-Aid Equipment http://www.huaracherunpas-cher.fr/chaussures-huarache-nike_152.html with the http://www.huaracherunpas-cher.fr/huarache-4_118.html WorkplaceMost places possess http://www.huaracherunpas-cher.fr/huarache-og-2017_143.html precise foibles regarding http://www.huaracherunpas-cher.fr/huarache-5_74.html field-work security with http://www.huaracherunpas-cher.fr/nike-air-force-huarache_124.html the http://www.huaracherunpas-cher.fr/nike-huarache-run_72.html personnel. The actual first-aid http://www.huaracherunpas-cher.fr/nike-air-flight-huarache_102.html devices can be supplied http://www.huaracherunpas-cher.fr/nike-air-huarache-bleu_167.html when the risks are http://www.huaracherunpas-cher.fr/free-huarache_103.html generally discovered. http://www.huaracherunpas-cher.fr/nike-air-huarache-1991_65.html The number http://www.huaracherunpas-cher.fr/nike-air-huarache-90_110.html of first-aid http://www.huaracherunpas-cher.fr/huarache-bordeaux_53.html packages, their articles and the http://www.huaracherunpas-cher.fr/huarache-nike-pas-cher_79.html places where http://www.huaracherunpas-cher.fr/air-nike-huarache_107.html weather resistant go http://www.huaracherunpas-cher.fr/nike-huarache-femme-pas-cher_140.html could be made the decision. http://www.huaracherunpas-cher.fr/huarache-leopard_77.html The necessity http://www.huaracherunpas-cher.fr/huarache-nike-chaussures_131.html of a http://www.huaracherunpas-cher.fr/nike-huarache-femmes_182.html great fresh air cyndrical tube http://www.huaracherunpas-cher.fr/nike-air-huarache-rouge_47.html , an http://www.huaracherunpas-cher.fr/huarache-light_50.html area to the http://www.huaracherunpas-cher.fr/air-huarache-solde_40.html things along with http://www.huaracherunpas-cher.fr/nike-huarache-3_108.html the amount of qualified http://www.huaracherunpas-cher.fr/nike-huarache-rouge_81.html staff http://www.huaracherunpas-cher.fr/huarache-montante_179.html regarding urgent matters must http://www.huaracherunpas-cher.fr/nike-huarache-beige_91.html be determined. http://www.huaracherunpas-cher.fr/nike-huarache-gris_59.html The belongings in this first-aid http://www.huaracherunpas-cher.fr/huarache-nike-noir_149.html equipment depend http://www.huaracherunpas-cher.fr/nike-air-huarache-turquoise_160.html upon the chance examination. http://www.huaracherunpas-cher.fr/nike-huarache-boutique_147.html Nonetheless, the http://www.huaracherunpas-cher.fr/air-huarache-blanc_123.html standard articles will include http://www.huaracherunpas-cher.fr/nike-huarache-2013_159.html clean and http://www.huaracherunpas-cher.fr/nike-huarache-light-ultramarine_171.html sterile bandages, http://www.huaracherunpas-cher.fr/nike-huarache-run-pas-cher_61.html gauze, plasters, towel mp3, safety gloves, hides, clean eye-pads, first-aid guide brochure, anti-inflammatory drugs, antiseptic products and ache treatment. Standard health-related tools for instance precise pair of scissors, tweezers, device, splint and more this kind of products could be included. With locations its keep can be a higher risk expert first-aid goods are needed this sort of products intended for eye clean and tools for burn off sufferers.

Comment by scott154 7 weeks and 3 days ago

Your point of view

You must be signed in to comment.