SCIENTIFIC-LINUX-USERS Archives

April 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Sommerseth <[log in to unmask]>
Reply To:
Date:
Tue, 9 Apr 2013 11:01:54 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
On 09/04/13 10:48, Steven Haigh wrote:
> On 09/04/13 18:29, vivek chalotra wrote:
>> Hello all,
>>
>> One of my friend has deleted all the data in /home by mistake using  rm
>> -rf command.
>> She actually used $ rm -rf ~
>> Now is there any way to recover that precious data.

Depending on the file system ... it maybe possible, at least to some
degree.  I doubt it's a VFAT/FAT file system as that's fairly trivial.
If the file system is ext[234], you may be lucky and restore files using
the 'debugfs' utility.  But that requires the filesystem to be unmounted
and not modified much at all.  And I believe you'll have a challenge
mapping file contents with new file names.

If you use any other file system, like xfs, jfs, btrfs ... you are
dependent on utilities provided for those file systems.  Unfortunately I
don't know much about available tools here.

Maybe tools like 'TestDisk' [1] may be of more help too.

[1] <http://www.cgsecurity.org/wiki/TestDisk>

> Restore from backup.

Indeed the best solution.

> If you don't have a backup, let this serve as a lesson as to WHY a
> backup is important.

Absolutely.  The '-f' option with cp, mv and rm are always dangerous.
Do always think trice about what you are doing when you use -f/--force
before hitting the ENTER key.


--
kind regards,

David Sommerseth

ATOM RSS1 RSS2