A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Storage (alternative)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

File with same number of bytes saved on same location on hard drive?



 
 
Thread Tools Display Modes
  #1  
Old November 7th 04, 09:51 PM
name
external usenet poster
 
Posts: n/a
Default File with same number of bytes saved on same location on hard drive?

Hello. I want to overwrite a file's old contents on the hard drive
(an NTFS partition), and was wondering if anyone knows for sure
whether this would work: open the file, change every byte to some
random value, and save the file. I'm not sure, will it be saved on
the same location on the hard drive, over the old one on disk? (I
realize there are utilities for doing file wiping, but I need this for
a bit more.)
  #4  
Old November 9th 04, 04:03 AM
Arno Wagner
external usenet poster
 
Posts: n/a
Default

Previously name wrote:
Hello. I want to overwrite a file's old contents on the hard drive
(an NTFS partition), and was wondering if anyone knows for sure
whether this would work: open the file, change every byte to some
random value, and save the file. I'm not sure, will it be saved on
the same location on the hard drive, over the old one on disk? (I
realize there are utilities for doing file wiping, but I need this for
a bit more.)


This works, unless you have a journalling filesystem or a filesystem
that does fragments (use not filled end-blocks for several files).
I am not aware of any filesystem that does this fragment usage,
although it was planned for ext2 at some time if I remember correctly.

In a journalling filesystem the original blocks will still be
overwritten, but there may be stuff in the journal that will not be
overwritten. NTFS is not journalling.

One thing you need to make sure of is that the blocks are flushed
to disk _before_ you delete the file (if you do). Otherwiese
the OS buffer-cache might see the deletion before it writes
the blocks to disk and just cancel the operation. The HDD
buffer is no problem here, since the HDD is not aware of the
filesystem. The HDD buffer may have an impact if you do
multiple overwrites.

Arno
--
For email address: lastname AT tik DOT ee DOT ethz DOT ch
GnuPG: ID:1E25338F FP:0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F
"The more corrupt the state, the more numerous the laws" - Tacitus


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AIW 9800pro and Age of Conquerors = Black screen axexango Ati Videocards 2 February 29th 04 04:11 PM
Windows XP fails to boot after Drive Image 7 restore Milleniumaire Storage (alternative) 11 February 28th 04 08:26 PM
Radeon 7500 Saphire Windows ME Problem Pamela and Howard Signa Gateway Computers 5 February 17th 04 10:07 PM
Can't get CD Burner to Burn Nottoman General 2 December 22nd 03 05:47 PM
Drive Image 2002 Rosie Storage (alternative) 9 November 20th 03 03:25 PM


All times are GMT +1. The time now is 01:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.