[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: URGENT! deleted my home directory



matheson@mail1.facile.com (Matheson) writes:

> I accidently moved my home directory into a temporary folder and then
> deleted it (I thought I had typed 'cp' but I guess I didn't).  So, I was
> wondering if there was a way to get everything back (undelete)
> 
Immediately unmount the partition in question to prevent any further
file system access to it.  Then make sure that you have the Midnight
Commander installed which comes with undeletefs support.  Start it up
and open "Command | Undelete files (ext2fs only)".  Specify the device
name (with the leading "/dev/" portion) of the partition and wait a
minute or two.  You will find a panel containing strange names like
the following example:

 < ~ --------------------------------------------------v>
|                Name               | Size  |    MTime   |
|/..                                |   1024|Mar  8 19:45|
|104858:109                         | 440192|Mar  5 16:15|
|106554:2                           |   4108|Mar  5 16:15|
|106555:25                          |  95368|Mar  5 16:15|
|106556:1                           |   2250|Mar  5 16:15|
|106557:118                         | 478118|Mar  5 16:15|
|106558:118                         | 478172|Mar  5 16:15|
|106559:118                         | 477740|Mar  5 16:15|
|106560:176                         | 715456|Mar  5 16:15|
|106561:33                          | 127244|Mar  5 16:15|
|106562:32                          | 126486|Mar  5 16:15|
|106563:48                          | 191000|Mar  5 16:15|
|106564:38                          | 148462|Mar  5 16:15|
|106565:97                          | 392352|Mar  5 16:15|
|106566:22                          |  84166|Mar  5 16:15|
|106567:8                           |  29900|Mar  5 16:15|
|106568:1                           |   2000|Mar  5 16:15|
|106569:2694                        | 10758K|Mar  5 16:15|
|106570:651                         |2659062|Mar  5 16:15|
|106571:17                          |  63756|Mar  5 16:15|
|106573:55                          | 219600|Mar  5 16:15|
|106574:86                          | 345274|Mar  5 16:15|
|106575:4                           |  12396|Mar  5 16:15|
|106576:34                          | 131214|Mar  5 16:15|
|106577:7                           |  26692|Mar  5 16:15|
|106578:2                           |   6352|Mar  5 16:15|
|106580:225                         | 916206|Mar  5 16:15|
 --------------------------------------------------------

Now just press * to mark all files and copy them into a directory on
any other partiton.  Maybe you won't be able to recover all files of
that partition but there is a big chance that you retrieve unharmed
all those which have still not been overwritten in the meantime by any
other file system access.  The most tedious part is to rename all
files to their former names.

The undelete file system is just an interface to the ext2fs library to
retrieve all of the deleted files names on an ext2fs and provides a
means to extract the selected files into a regular partition.  Real
men probably use "debugfs(8)" directly but using MC as a frontend
strikes me as far more comfortable.

                       Good luck with undeleting, P. *8^)
-- 
   ------------ Paul Seelig <pseelig@mail.uni-mainz.de> -------------
   African Music Archive - Institute for Ethnology and Africa Studies
   Johannes Gutenberg-University   -  Forum 6  -  55099 Mainz/Germany
   ------------------- http://ntama.uni-mainz.de --------------------


Reply to: