LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Free space wiping in Linux? (https://www.linuxquestions.org/questions/linux-software-2/free-space-wiping-in-linux-171220/)

IamI 04-17-2004 04:05 AM

Free space wiping in Linux?
 
I know about shred, but I'm looking for something that will overwrite free space on a Linux ext3 partition, not pre-existing files. Any suggestions?

Muzzy 04-17-2004 05:04 AM

How about doing this?

cat /dev/urandom > deleteme

Then delete the resulting file, or shred it.

That's just an idea... not sure if it is the best way.

Regards,
Mark.

Muzzy 04-17-2004 05:07 AM

A problem with this method is that it will fill your harddisk temporarily. I'm not sure if this can cause problems, I guess you could lose some log messages. Is this good enough for your needs?

ugge 04-17-2004 07:26 AM

http://www.sysresccd.org/
This rescue cd contains a couple of utilities for wiping disks.

Komakino 04-17-2004 08:02 AM

There's a program called bcwipe for windows, of which there also exists a command line linux version.

IamI 04-17-2004 08:21 AM

It took me a bit to figure out what "cat /dev/urandom > deleteme" was doing (I'm still kind of a newb); it's a nifty idea.

But yes, I'm not keen on packing my drive tight with a gigantic garbage file if it can be avoided.

IamI 04-17-2004 08:22 AM

Quote:

Originally posted by Komakino
There's a program called bcwipe for windows, of which there also exists a command line linux version.
I have BCWipe on the Win32 side; is the command line version from the same outfit?

*EDIT* I got the Unix version. Looks like what I need. Thanks to all who replied.

Komakino 04-17-2004 08:41 AM

Quote:

Originally posted by IamI
I have BCWipe on the Win32 side; is the command line version from the same outfit?

*EDIT* I got the Unix version. Looks like what I need. Thanks to all who replied.

Yeah. Jetico I think is their name.

triley 05-13-2004 11:38 AM

Have you had success using it? I'm trying to wipe the free space on my hard drive. After the first pass, it consistently tells me that I'm out of free space. My command is: bcwipe -F -S -v -m 3 /

Any suggestions?

stickman 05-13-2004 11:58 AM

One of the secure delete packages includes an sfill utility for just this purpose. Also you may want to consider temporarily disabling the journaling while you do this.

triley 05-13-2004 12:49 PM

I'm not familiar with the sfill utility or journaling.

stickman 05-18-2004 03:25 PM

Journalling is a nice little feature that keeps track of changes in your file system. If you use a journaling filesystem like ext3 or reiser, then your system is making a nice little log of everything that it deletes.

bun_zee 06-23-2004 09:37 AM

Stickman
How does it matter that journaling keep a nice little log of everything it does?

As long as the log does not contain the sensitive data that is needed to be deleted. Metadata is kept in the log, fine. Sensitive data, not fine.

This command will set ext3 to journal metadata only:
#mount –t ext3 –o data=writeback /dev/sda2 /jdisk

Would this solve the journaling issue in secure delete? Any one!

Regards,

BunZ

Nakarti 01-29-2012 08:54 PM

Yeah the Windows utilities more or less do the same thing as dd if=/dev/<datasource> of=/mountpoint/scratch ; rm /mountpoint/scratch
Its the only safe way short of some elaborate filesystem locking to avoid destroying data in actual files.
Yes you will get a disk full warning, but the process is to delete the new empty file so its no longer full.

Of course, it doesn't clear block-allocated file-free space (space within allocated blocks that is not used by the files with the allocation.)

H_TeXMeX_H 01-30-2012 03:44 AM

Here's what I have been running, it is fast and it has always worked properly:

Code:

dd bs=4M if=/dev/zero of=file; rm -f file


All times are GMT -5. The time now is 05:26 PM.