rm -rf : What does it really do

Joel Hammer Joel
Mon May 17 11:47:02 PDT 2004


Well, some removal commands write 0's and 1's or some such over the old
data. Some just "unlink" the file, which in my primitive understanding
leaves all the data in place but without a pointer or file name to
access the data. I believe in DOS the first byte of each file was
changed to signify it was no longer in use, but such files could easily
be recovered.

I was wondering, while waiting 30 minutes for rm -rf* to clean up a 40 gig
directory, what was taking so long. I did note that rm never used for than a
few per cent of cpu cycles during this entire time. But, I was wondering if
this long delay was due to rm overwriting the old data with 0's.

Joel
 

On Sat, May 03, 2003 at 09:51:03AM -0400, Tim Wunder wrote:
> On Saturday 03 May 2003 9:31 am, someone claiming to be Joel Hammer wrote:
> > Just an idle thought while waiting for rm -rf* to remove a 40 gig
> > directory.
> >
> > This is taking quite a while. Does  rm just unlink files, leaving the
> > data recoverable, or does it make the date unrecoverable?
> >
> 
> rm = remove
> -f = force
> -r = recursive
> 
> But you know that.  I guess I don't understand the question. What do you mean 
> by "just unlink files" and "leaving the data recoverable"?
> 
> Tim
> 
> 
> -- 
> RedHat Psyche 8.0, stock kernel, KDE 3.1.CVS, Xfree86 4.2.1
>   9:45am  up 4 days, 11:39,  3 users,  load average: 1.10, 1.37, 0.91
> It's what you learn after you know it all that counts
> 
> _______________________________________________
> Linux-users mailing list
> Linux-users at linux-sxs.org
> Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users


More information about the Linux-users mailing list