wipe -k /dev/sdX1
-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 umlimited.
and it supports different patterns:
-p, --pattern nnsa|dod|bsi|old|fastold|gutmann|random|random2
Select the patterns to write. nnsa selects patterns compliant with NNSA Policy Letter NAP-14.x; dod selects patterns compliant with DoD 5220.22-M; bsi selects patterns recommended by the German Center of Security in Information Technologies (http://www.bsi.bund.de); old selects pre-version 1.7 scrub patterns; and fastold is old without the random pass. gutmann is a 35-pass sequence described in Gutmann's paper cited below. See STANDARDS below for more detail. random is a single random pass. random2 is two random passes. Default: nnsa.
Hope it'll help
]]>That doesn't really answer your specific question though. As for how to get that done, I'm not sure except by using shred instead of rm to delete things in the future (which is itself not always perfect)
]]>So I'm now trying to wipe all my free space on /home to prevent against recovering with tools like photorec. (one overwrite should do, the need of multiple overwriting is just a rumor)
But still I haven't found any solution to wipe this free space successfully.
I tried dd if=/dev/zero of=/home/fillitup bs=512 count=[count of free sectiors] so my partition was complete full of data.
df /dev/mapper/home said 100% is used and there are 0 sectors available. But I could still recover gigs of data with photorec, although I selected to recover just form the free space.
photorec displays: /dev/mapper/home - 340 GB / 317 GiB (RO) , but df displays that the size of /home is just 313G, why are there these differences and what did the 340GB means?
It looks like there is a place on my /dev/mapper/home partition, that I can't access to overwrite, but I can access it to recover. I also checked for corrupted sectors, but there aren't any.
Did anyone knows why I can't wipe my free space with dd, and how I can find the location of the loads of recoverable files, to securely delete them?
]]>