Re: deleting files with linux

From: Whoever (nobody@devnull.none)
Date: 04/22/03


From: Whoever <nobody@devnull.none>
Date: Mon, 21 Apr 2003 22:41:47 GMT

On Mon, 21 Apr 2003, G. Wolfe Woodbury wrote:

> Sebastián Francisco <secobau@teleco.upv.es> shaped electrons to say:
> > Do you know how linux delete files? Does it actually remove them, or by the
> > contrary, they remain intact? Is there any Eraser version for linux?
>
> The "standard" Linux filesystem (ext2/ext3) remove files by removing the
> pointer to the 'i-node' in the directory file. The i-node is then
> released for re-use, and the disk blocks in use by the inode are added
> back to the list of free blocks.
>
> There is no easy way for the file to be "un-deleted" under Linux, but
> there are some versions of "rm" that have been changed to move the file
> to a trash folder and then deleted at intervals.
>
> If you want to securely erase the file with zero's or other data before
> deleteing the file there are secure rm programs (generally known as
> shredders) or you can use available system commands:
>
> ls -l <filename> #to get the length of the file
> dd if=/dev/zero of=<filename> count=<length> #to write zero's
> dd if=/dev/urandom of=<filename> count=<length> #to write random data bytes
> rm <filename>
>
> This will generally be enough to remove the contents of the file from
> the disk drive blocks.

Are you sure that this mathod will ensure that the same space (as used by
the original file) on the disk will be overwritten? Or will it just create
a new location filled with random data and then point the directory to
that new location, leaving the old data in place on the disk?

>
>



Relevant Pages

  • Re: Panasonic HD Recorders - What disk format?
    ... The earlier part of this is more about what may be Linux partitioning, ... might be possible to present the recorder with a larger disk already ... Most DOS/Windows utilities such as FDisk, Ghost, and Partition Magic Pro ... prompts to format it. ...
    (alt.os.linux)
  • Re: defrag in linux?
    ... heads of your HD advance sequentially through the hard disk. ... fragmentation is a concern when one ... On the other hand, if you are Linux, you reorder the ... 'file fragmented' Linux file system and a 'file unfragmented' Linux ...
    (alt.os.linux.suse)
  • [ANNOUNCE]: RIP Linux rescue system!
    ... This is a bootable CD Linux boot/rescue system! ... The bootable CD image `RIP-12.7.iso.bin' can be written to a CD disk, ... It also includes the CD/DVD UDF filesystem packet writing tools (cdrwtool, ... a Linux reiserfs and reiser4 filesystem. ...
    (comp.os.linux.announce)
  • Re: Gparted help
    ... underestimated the amount of disk space I would need for the Linux ... boot your Mac OS system CD ... The firewire drives can also have a USB 2.0 interface as well so they ...
    (comp.os.linux.powerpc)
  • Re: dos defragmentation utility
    ... | I have been using linux for school since a last spring and have since ... heads of your HD advance sequentially through the hard disk. ... fragmentation is a concern when one ... 'file fragmented' Linux file system and a 'file unfragmented' Linux ...
    (comp.os.linux.questions)