[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

undelete a file



-- mks -- 

---------- Forwarded message ----------
Date: Mon, 18 Dec 2000 03:00:55 +0530
From: Lawrence J. D'souza <lawrie@xxxxxxxxxxxxxx>
To: ilug-goa@xxxxxxxxxxx

Hi!

Is it possible to undelete a file that has been deleted.
Well! kde has has an option to move file to recycle bin, but then how do
i recover a file that been deleted from the recycle bin. (i use gnome)

what do you think? is there a way to undelete a deleted file.
yes there is. here's what i got when trying out  mc (midnight
commander)

mc has a option to undelete file, but the help file there is not all
that helpful, especially to a newbie like me. after  over a dozen
unsuccessful attempt to undelete a file, i finally made it. (this
options works only with
ext2 files) 

here's the fruit of my endeavour, i hope it will be of help to other
newbies like me who delete files only to realize that they were useful.  

          UNDELETE

start mc in u'r term. (root only, u could also switch to super user  [$
su - ] from user term.)
1. once fired up press the F9 key and arrow  right ->  to move to
Options (F9-O or u can use the mouse too, just click on Options)
2. arrow down to Configuration and press enter (c {shortcut key})
3. a configuration options box pops up, arrow down till u reach the
option "safe delete" press the space bar to select it.
4. now arrow down to save and press enter.
after having done that u'r mc prog. is now configured to handle
undelete.
5. Now start the trickiest part which really took me some time to
understand.
 before deletion the file had a name but when trying to undelete, mc
does
not return a file name but a number. (inode number the file resided on	.
here's where mandrake helped me because in their tutorial they have
explained inodes in detail it was of a great help to a newbie like me.)

To begin with lets suppose u have just deleted a file called <mytest>
from u'r /home/lawrie dir. and u want to undelete it (undelete will not
work if the file has been over written), here how to get around the
problem.

(start mc [root] if not up) key in F9 and arrow to Command and then
press space bar. (F9-c)
6. arrow down to undelete and press enter (u)
 
7.in the pop up dialogue enter the device name (partition no. hda10)
that
u want to undelete, suppose u'r file <mytext> resided on hda10 then
enter: hda10 and arrow to ok press enter. (hda10 is my home partition,
if u have a common partition for all files then enter that partition no.
but here thing can really get difficult to actually trace u'r deleted
file.) 

8. mc now scans u'r partition and creates a temp. file called
#undel:hda10 in the right panel displaying the information of every file
that can be undeleted. but here lies the main problem, mc does not
display the name of the file instead it displays the inode no. of the
file, also it displays time and size of the file. I think this should
suffice to really trace u'r deleted file. 
9. to check the contents of each file tab over to the next panel (press
tab)
10. now arrow down to each file and press F3 to see the contents of the
file.
11. after having satisfied u'r self that the file is ok. copy it(F5)
over to the dir. it originally resided on, giving it a name of u'r
choice (the file to be copied should be highlighted).
u have successfully undeleted a file.

if u have managed to come this far, then I think u can get more
adventurous and try out the other commands available in mc. 
do let us know about u'r experience.

best of luck.


\"""/  
(.".)
  v
\ ^ /  Lawrie
~~~~~~~~~~~~~~

---
Visit our home page at: www.chennailug.org
Send e-mail to 'ilugc-request@xxxxxxxxxxxxxxxxxx' with 'unsubscribe' 
in either the subject or the body to unsubscribe from this list.