LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 04-17-2004, 04:05 AM   #1
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Rep: Reputation: 15
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?
 
Old 04-17-2004, 05:04 AM   #2
Muzzy
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Gentoo, Slackware
Posts: 333

Rep: Reputation: 30
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.
 
Old 04-17-2004, 05:07 AM   #3
Muzzy
Member
 
Registered: Mar 2004
Location: Denmark
Distribution: Gentoo, Slackware
Posts: 333

Rep: Reputation: 30
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?
 
Old 04-17-2004, 07:26 AM   #4
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
http://www.sysresccd.org/
This rescue cd contains a couple of utilities for wiping disks.
 
Old 04-17-2004, 08:02 AM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
There's a program called bcwipe for windows, of which there also exists a command line linux version.
 
Old 04-17-2004, 08:21 AM   #6
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
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.
 
Old 04-17-2004, 08:22 AM   #7
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
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.

Last edited by IamI; 04-17-2004 at 08:34 AM.
 
Old 04-17-2004, 08:41 AM   #8
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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.
 
Old 05-13-2004, 11:38 AM   #9
triley
Member
 
Registered: Oct 2003
Posts: 74

Rep: Reputation: 15
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?
 
Old 05-13-2004, 11:58 AM   #10
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
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.

Last edited by stickman; 05-13-2004 at 12:04 PM.
 
Old 05-13-2004, 12:49 PM   #11
triley
Member
 
Registered: Oct 2003
Posts: 74

Rep: Reputation: 15
I'm not familiar with the sfill utility or journaling.
 
Old 05-18-2004, 03:25 PM   #12
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
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.
 
Old 06-23-2004, 09:37 AM   #13
bun_zee
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Rep: Reputation: 0
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
 
Old 01-29-2012, 08:54 PM   #14
Nakarti
LQ Newbie
 
Registered: Jun 2004
Posts: 3

Rep: Reputation: 0
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.)

Last edited by Nakarti; 01-29-2012 at 10:47 PM.
 
Old 01-30-2012, 03:44 AM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
API for getting free space information in Linux. srns Programming 5 04-26-2005 05:52 PM
wipe free space with Linux? bigrobot Linux - Software 2 02-19-2005 04:08 AM
how to know how much disk space is free on linux through programming payal_shah Linux - Hardware 3 12-12-2004 02:49 PM
Not enough free space on hard drive with 50g of free space??? auoq SUSE / openSUSE 5 10-13-2004 08:21 PM
Formating free space: WinXP pro and RH9 dualboot with free space on 3rd drive Vermicious Linux - General 2 03-22-2004 05:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration