in reply to Re: restoring files in ext2fs
in thread restoring files in ext2fs

I am sorry, but this is not what I have meant.
Somebody (not me, I immediatly fell on my knees and sweared that that I will look at my fingers while I am root) removed a big portion of the entire filesystem by entering
rm -r /some_path/ *
The white space causes rm to remove all files recursivly under the current directory tree. If there were only one or two files I could do it from the command line by modifying the inodes. This would be a a better (forgive me, gods of perl!) way, because the files would be undeleted as they are (I am not to good in reading binary files).
Unfortunatly we are talking about 4000 files. Finding borders takes more time than removing the deletion time of inodes.
So the question was:
Is there any way to manipulate inode-information with perl?
I am looking for something like
use CodeFromTheGodsofExt2fs; my %inode = getInode($InodeNumber); $inode{"DeletionTime"}=0; $inode{"Link"}=1; writeInode(%Inode);
This could be done several (4000) times to recover all files that were deleted until that guy (not me I swear it) realized that Control-C would be a good idea.
The harddisk stayed untouched, so the last command which accessed the hdd was the rm -r - command.

Regards ...

P.S.: I wrote my previous posting anonymous NOT because I am that guy (nope, it was not me - I have aliased rm to rm -i on my machines) but because the enemy-machine did not accept cookies at all.

Replies are listed 'Best First'.
Re: Re: Re: restoring files in ext2fs
by very empty (Scribe) on Feb 06, 2002 at 18:50 UTC
    One way could be to patch the debugfs-sourcecode, but this is too dirty for me.

    Regards...