rm -rf : What does it really do

Tom Wilson wtw
Mon May 17 11:47:02 PDT 2004


On Saturday 03 May 2003 09:31 am, Joel Hammer's voice rose above the 
ones in my head and stated:
> 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?

I'm not sure about unlinking but *some* of the data can be recoverable 
but only if you shutdown you system ASAP then boot to runlevel 1 and 
remount the partition the filesystem is on as read only.  If not, the 
os starts re-using the inodes of the deleted data pretty soon.

I speak from experience as I wiped my home directory out back in October 
and managed to recover most of the files( the important ones anyway).  
There are some utilities that can automate the process but it is still 
a very. very big time consuming PITA.




More information about the Linux-users mailing list