Results 1 to 8 of 8
Ok, I need a good method to delete a file so it can not be recovered at all without wiping the entire partition or disk. Anyone have any ideas?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-01-2003 #1Linux Engineer
- Join Date
- Jan 2003
- Location
- Lebanon, pa
- Posts
- 994
Deleting?
Ok, I need a good method to delete a file so it can not be recovered at all without wiping the entire partition or disk. Anyone have any ideas?
- 03-01-2003 #2Linux Engineer
- Join Date
- Jan 2003
- Location
- Lebanon, pa
- Posts
- 994
How well does shred work?
EDIT
Just checked and shred won't work on any journaled filesystem.
- 03-02-2003 #3Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
Can't you do like this?
That should zero all blocks in the file, right? I guess you could tweak 1024 to the actual blocksize of the underlying device for greater performance, but... big deal...Code:dd if=/dev/zero of=$filename bs=1024 count=$(((`ls -l $filename | awk '{print $5;}'` / 1024) + 1))
- 03-02-2003 #4Linux Enthusiast
- Join Date
- Jun 2002
- Location
- San Antonio
- Posts
- 621
ah yes, you could zero them out, but there is still a residual magnetic signature. There have been cases of files that were "shredded" like that over 5 times that were still recoverable. The only real way to do it is melt the platter
I respectfully decline the invitation to join your delusion.
- 03-02-2003 #5Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
You're right of course. Like this then?
That should make it far less traceable, right? (Of course, /dev/random isn't the fastest solution, so /dev/urandom might be preferrable)Code:for i in `seq 1 10`; do dd if=/dev/random of=$filename bs=1024 count=$(((`ls -l $filename | awk '{print $5;}'` / 1024) + 1)) don
- 03-03-2003 #6Linux Engineer
- Join Date
- Jan 2003
- Location
- Lebanon, pa
- Posts
- 994
Well I ended up using shred to just overwrite the files to make them unreadable. It worked good, when I cat the outputs it just displays a bunch of stuff which messes up my term as well.
- 03-03-2003 #7Linux User
- Join Date
- Feb 2003
- Location
- Norway, Asker
- Posts
- 267
silly me. i was thinking that wipe did the files unrecoverable?
- 03-04-2003 #8Linux Enthusiast
- Join Date
- Jun 2002
- Location
- San Antonio
- Posts
- 621
good idea Dolda, I never thought of using pseudorandomness to cover up files like that. There was a thread on LKML (maybe it was somewhere else?) where no one thought of that.
I respectfully decline the invitation to join your delusion.


Reply With Quote
