Wednesday, June 4, 2014

scrub: -X argument cannot exist

I've been looking for a utility that will clean disks for me - and I do realize this is no real substitute for shredding them. Anyway, scrub seems to do the job. However, when I tried to run it I got:

scrub: -X argument cannot exist

This had me stumped because I read it as "the -X argument cannot exist", which seemed to make no sense whatsoever. And indeed it means "the argument to -X cannot be a directory that exists". Simply running it with a new directory, like so:

root@server:/home# scrub -X /home/scrub
scrub: using NNSA NAP-14.x patterns
scrub: scrubbing /home/scrub/scrub.000 1073741824 bytes (~1GB)
scrub: random  |..^C                                            |


It is notable that more current versions of scrub fix the error message to be more intuitive (mine was still 2.2).


  1. Simply check if the -X already exist.

  2. It seems so obvious once you understand, but I had to google it. Thankfully, your site was 1 of 3, so i wasn't looking too long.

    Cheers mate.

  3. Welcome. And glad it helped - that's the entire purpose of this site; feeding solutions to my own problems back into Google so that others might benefit!