Closed GoogleCodeExporter closed 8 years ago
From the scrub manual:
-X, --freespace
Create specified directory and fill it with files until write
returns ENOSPC (file system full), then scrub the files as
usual. The size of each file can be set with -s, otherwise it
will be the maximum file size creatable given the user's file
size limit or 1g if unlimited.
You might try scrub -X /tmp/scrubdir or something like that.
Original comment by garlick....@gmail.com
on 12 Feb 2014 at 2:52
It works with just -X:
root@bismark:~/scrub-2.5.2# ./src/scrub -X /tmp/scrub
scrub: using NNSA NAP-14.1-C patterns
scrub: created directory /tmp/scrub
scrub: scrubbing /tmp/scrub/scrub.000 1073741824 bytes (~1024MB)
scrub: random |............
but if you specify a pattern to use:
root@bismark:~/scrub-2.5.2# ./src/scrub --pattern dod -X /tmp/scrub
./src/scrub: illegal option -- -
Usage: scrub [OPTIONS] file
-v, --version display scrub version and exit
-p, --pattern pat select scrub pattern sequence
-b, --blocksize size set I/O buffer size (default 4m)
-s, --device-size size set device size manually
-X, --freespace dir create dir+files, fill until ENOSPC, then scrub
-D, --dirent newname after scrubbing file, scrub dir entry, rename
-f, --force scrub despite signature from previous scrub
-S, --no-signature do not write scrub signature after scrub
-r, --remove remove file after scrub
-L, --no-link do not scrub link target
-R, --no-hwrand do not use a hardware random number generator
-t, --no-threads do not compute random data in a parallel thread
-h, --help display this help message
Available patterns are:
nnsa 3-pass NNSA NAP-14.1-C
dod 3-pass DoD 5220.22-M
bsi 9-pass BSI
usarmy 3-pass US Army AR380-19
random 1-pass One Random Pass
random2 2-pass Two Random Passes
root@bismark:~/scrub-2.5.2# ./src/scrub -p dod -X /tmp/scrub
scrub: using DoD 5220.22-M patterns
scrub: -X directory already exists
root@bismark:~/scrub-2.5.2#
Original comment by sancho...@gmail.com
on 12 Feb 2014 at 5:45
Oh sorry, I latched on to the "directory already exists" problem. Sounds like
scrub was built without getopt_long(). If you can use the short options
(single hypen) you should be ok.
Original comment by garlick....@gmail.com
on 13 Feb 2014 at 4:31
verified it works with short options:
root@bismark:~/scrub-2.5.2# src/scrub -p dod -b 1048576 -R -f
/tmp/tmp09081085801468397046.jar
scrub: using DoD 5220.22-M patterns
scrub: scrubbing /tmp/tmp09081085801468397046.jar 57344 bytes (~56KB)
scrub: random |................................................|
scrub: 0x00 |................................................|
scrub: 0xff |................................................|
scrub: verify |................................................|
root@bismark:~/scrub-2.5.2#
getoptlong was not defined:
configure:5702: checking for getopt_long
configure:5758: gcc -o conftest -g -O2 conftest.c >&5
ld: 0711-317 ERROR: Undefined symbol: .getopt_long
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
configure:5765: $? = 1
configure: failed program was:
Thanks for the 411.
Original comment by sancho...@gmail.com
on 13 Feb 2014 at 5:59
Original issue reported on code.google.com by
sancho...@gmail.com
on 11 Feb 2014 at 9:04Attachments: