rm -rf : What does it really do
Net Llama!
netllama
Mon May 17 11:47:02 PDT 2004
On 05/03/03 08:50, Tom Wilson wrote:
> 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.
This is very heavily depedent on the type of filesystem in use, whether
it has a journal, and how often that journal is updated. In fact, on
Linux, i'd say your statement is only truly accurate for ext2.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman netllama at linux-sxs.org
Linux Step-by-step & TyGeMo: http://netllama.ipfox.com
9:05am up 55 days, 8:31, 3 users, load average: 0.14, 0.15, 0.08
More information about the Linux-users
mailing list