Securely Removing individual files from a system

Is there any way to securely delete individual files from the Solaris OS so that the file is removed and overwritten. I have read on using the format utility to wipe whole disks, however I do not want to lose all data on that disk. In Linux the shred command deletes individual files and then overwrites it.

[314 byte] By [tumminea] at [2007-11-27 7:49:23]
# 1

I'm sure someone with more time to google on this will find it, but the routine should be simple -

you just need to determine the size of the file you're going to need to overwrite (obtainable by ls even), and then have some routine dd /dev/random or some other facility to *quickly* copy junk data to the filespace, then remove it (you could even wash, rinse, repeat as needed)

I'll yield to some other adventurous soul

jeffrey.sa at 2007-7-12 19:30:20 > top of Java-index,General,Sun Alert and Security Discussion...
# 2
I put together a very quick script to do this - I'm sure it could use some cleanup, but if you want it, send me email seul@alcatel-lucent.comthanks!
jeffrey.sa at 2007-7-12 19:30:20 > top of Java-index,General,Sun Alert and Security Discussion...
# 3

> I'm sure someone with more time to google on this

> will find it, but the routine should be simple -

>

> you just need to determine the size of the file

> you're going to need to overwrite (obtainable by ls

> even), and then have some routine dd /dev/random or

> some other facility to *quickly* copy junk data to

> the filespace, then remove it (you could even wash,

> rinse, repeat as needed)

>

> I'll yield to some other adventurous soul

While the question asked about "Solaris", the answer really depends more on the filesystem. For instance, if you're using ZFS, none of these techniques appear appropriate. You'd need to scrub the physical disks.

--

Darren

Darren_Dunhama at 2007-7-12 19:30:20 > top of Java-index,General,Sun Alert and Security Discussion...
# 4
fair enough, I guess it could also depend on location of the storage, like if it's on a filer with snapshots for instance...
jeffrey.sa at 2007-7-12 19:30:20 > top of Java-index,General,Sun Alert and Security Discussion...
# 5
The file is located on a raid 5 UFS filesystem that is logging.
tumminea at 2007-7-12 19:30:20 > top of Java-index,General,Sun Alert and Security Discussion...