Page 1 of 1

[SOLVED] Recover accidentally deleted files?

Posted: Fri Jun 10, 2016 4:49 am
by Pjotr
Today, I accidentally deleted a lot of files from an EXT4 partition. It was an ordinary "delete" within the file manager, after which I emptied the trash bin. So thankfully no formatting and such.

Now I want those files back.... :P

I already searched a bit for solutions and tried testdisk, but no success so far. Who has a good tip for me?

Re: Recover accidentally deleted files?

Posted: Fri Jun 10, 2016 6:05 am
by Habitual
PhotoRec ?

Re: Recover accidentally deleted files?

Posted: Fri Jun 10, 2016 6:29 am
by rene
You could also try "extundelete", itself available through apt-get and its documentation through after installation "$ man extundelete" and/or http://extundelete.sourceforge.net/.

I seem to recall it having been kind to me on occasion but also note http://batleth.sapienti-sat.org/project ... l#undelete. That is, basically you're buggered.

Re: Recover accidentally deleted files?

Posted: Fri Jun 10, 2016 6:55 am
by Cosmo.
Additional problem might be, that the Trash bin can contain several files with the same file name. As this is not physically possible inside of one folder, the files get renamed and the real file name gets stored (with some other information) inside of Trash/info. This means, that you have to look for files with a slightly different name, than they had originally.

Re: [SOLVED] Recover accidentally deleted files?

Posted: Fri Jun 10, 2016 10:00 am
by Pjotr
Thanks for your answers! With Photorec I seem to be able to undo a lot of damage. :)

Re: [SOLVED] Recover accidentally deleted files?

Posted: Fri Jun 10, 2016 12:02 pm
by kukamuumuka
R-Linux is easy to use and it finds also deleted files.
show deleted.jpg

Re: [SOLVED] Recover accidentally deleted files?

Posted: Fri Jun 10, 2016 12:11 pm
by Habitual
administrollaattori wrote:R-Linux
I forgot about this gem!

Re: [SOLVED] Recover accidentally deleted files?

Posted: Fri Aug 12, 2016 1:04 am
by electroken
I used testdisk to try to recover some files lost while copying them. I was copying folders each containing a movie and its description as a txt file usually. I was copying them into another directory on the same disk. Something went wrong and I suddenly had lost almost all the content of the larger directory and I had deleted the other directories using shift del.

I made the recovery (as much as I could have hoped for) but the files (movies and all the txt files or any other recovered files were all marked with an x in the upper right hand corner and also most had a padlock image on them.

Of course I knew I had to run testdisk as sudo, but I was now faced with how to deal with the files it copied to another drive and how to unprotect them or be able to read them or use them in any way.

How do I do that? I seem to have most I lost but see no way to use the files it recovered. I remember using a windows recover program many years ago that didnt have such a problem. It ran from the gui and not the command line. Seems to me this should not amount to a big deal to recover these files as it was not a result of a partitioning error of some kind of formatting issue. The drive is good and checks ok as far as I would risk checking it.

I have not copied to the drive with the problem. I have looked at directories and tried to open some files but no manipulation on the subject disk.

My biggest issue is to be able to use the files which were recovered so far. I am also going to try to use R-Linux

Re: [SOLVED] Recover accidentally deleted files?

Posted: Sun Aug 14, 2016 3:52 am
by kukamuumuka
electroken wrote:but I was now faced with how to deal with the files it copied to another drive and how to unprotect them or be able to read them or use them in any way.
You need to take the ownership the files if you rescued to the linux filesystem.

Code: Select all

sudo chown yourself -R /path/files
sudo chmod 770 -R /path/files

Re: [SOLVED] Recover accidentally deleted files?

Posted: Sat Aug 27, 2016 12:11 am
by electroken
Yes I was able to make this work. I went into the directory where all the files were now located and ran the commands from there and it was all good.
Thank you.