Jump to content

restore deleted files

Go to solution Solved by fjdhdhcyfhf,

You might find the 'find' command useful to produce a list of valid recovered image files, from there you have to rename and put into folders manually.

http://man7.org/linux/man-pages/man1/find.1.html

 

The file-system table which is where folder/directory structure is stored. delete a file and all you are doing is removing its entry from the table. This is why various programs are able to recover file data but not details like names and folder structure. You have to do this manually.

 

p.s. I prefer Backintime to any other backup program, it records snapshots and handles storage/deletion.

hello, im using debian with xfce, yesterday i made a mistake and delete all my backup files (photos, docs, etc), i searched for trash folder but in there was nothing in trash folder, so i decided to recover files with photorec. This was successful, but files are stored in so many folders (rec_dir1,2,3...), and in these folders also cantains .cab, ttf, xml and and other files which were not in backup folder..i searched on forums, and trash folder should be located in /home/usrname/.local/share/Trash/files, but in share folder i dont have any other folder, also looked for ~/Documents/Trash-1000, but there isnt any ~/Documents folder..As i said, i recovered deleted files, but those files were split into a lot of folders (about 300 folders) and manual sorting these files would take so long..

Link to comment
https://linustechtips.com/topic/781682-restore-deleted-files/
Share on other sites

Link to post
Share on other sites

4 minutes ago, SkyBunny said:

hello, im using debian with xfce, yesterday i made a mistake and delete all my backup files (photos, docs, etc), i searched for trash folder but in there was nothing in trash folder, so i decided to recover files with photorec. This was successful, but files are stored in so many folders (rec_dir1,2,3...), and in these folders also cantains .cab, ttf, xml and and other files which were not in backup folder..i searched on forums, and trash folder should be located in /home/usrname/.local/share/Trash/files, but in share folder i dont have any other folder, also looked for ~/Documents/Trash-1000, but there isnt any ~/Documents folder..As i said, i recovered deleted files, but those files were split into a lot of folders (about 300 folders) and manual sorting these files would take so long..

you have no other choice...

btw cant you just back your system again

Link to comment
https://linustechtips.com/topic/781682-restore-deleted-files/#findComment-9855555
Share on other sites

Link to post
Share on other sites

20 minutes ago, SkyBunny said:

hello, im using debian with xfce, yesterday i made a mistake and delete all my backup files (photos, docs, etc), i searched for trash folder but in there was nothing in trash folder, so i decided to recover files with photorec. This was successful, but files are stored in so many folders (rec_dir1,2,3...), and in these folders also cantains .cab, ttf, xml and and other files which were not in backup folder..i searched on forums, and trash folder should be located in /home/usrname/.local/share/Trash/files, but in share folder i dont have any other folder, also looked for ~/Documents/Trash-1000, but there isnt any ~/Documents folder..As i said, i recovered deleted files, but those files were split into a lot of folders (about 300 folders) and manual sorting these files would take so long..

Could you not just write a simple shell script to recursively trawl through the new folder structure and copy/move all the files to a different directory that matches your requirements?

 

That's what i'd do...

I will only ever answer to the best of my ability - there is absolutely no promises that I will be correct. Or helpful. At all.

 

My toaster:

Spoiler

CPU: Intel Core i5-4670k @ 4.3GHz
Motherboard: Asus Maximus VI Formula
RAM: 16GB Corsair Vengeance DDR3
GPU: Nvidia GeForce GTX770 2GB
Case: Some free Sharkoon case
Storage: Crucial MX500 500GB SSD | Western Digital Blue 1TB
PSU: Corsair HX750
Display(s): Acer framless 24" 1080p thing | Acer 22" 1600x900 thing
Cooling: Corsair H100i AIO | 2 x Corsair LL120 front intakes on radiator | 1 x Corsair LL120 rear exhaust
Keyboard: Steelseries Apex
Mouse: R.A.T 7
Sound: HyperX Cloud II headset | Creative EAX 5.1 speakers
OS: Windows 10 Pro

 

Link to comment
https://linustechtips.com/topic/781682-restore-deleted-files/#findComment-9855586
Share on other sites

Link to post
Share on other sites

Just now, SkyBunny said:

i think that i cannot, becase e.g. in folder 1 i have next three folders, in that folders i have files and next folder....and recovered files dont have original names  (they has names like 0135135.png,)

Based on this, it would still be possible, but you wouldn't be able to restore file names - just have all of the files in a single top level directory for you to sort through yourself. Not ideal, but better than an overly complicated directory structure IMO

I will only ever answer to the best of my ability - there is absolutely no promises that I will be correct. Or helpful. At all.

 

My toaster:

Spoiler

CPU: Intel Core i5-4670k @ 4.3GHz
Motherboard: Asus Maximus VI Formula
RAM: 16GB Corsair Vengeance DDR3
GPU: Nvidia GeForce GTX770 2GB
Case: Some free Sharkoon case
Storage: Crucial MX500 500GB SSD | Western Digital Blue 1TB
PSU: Corsair HX750
Display(s): Acer framless 24" 1080p thing | Acer 22" 1600x900 thing
Cooling: Corsair H100i AIO | 2 x Corsair LL120 front intakes on radiator | 1 x Corsair LL120 rear exhaust
Keyboard: Steelseries Apex
Mouse: R.A.T 7
Sound: HyperX Cloud II headset | Creative EAX 5.1 speakers
OS: Windows 10 Pro

 

Link to comment
https://linustechtips.com/topic/781682-restore-deleted-files/#findComment-9855609
Share on other sites

Link to post
Share on other sites

You might find the 'find' command useful to produce a list of valid recovered image files, from there you have to rename and put into folders manually.

http://man7.org/linux/man-pages/man1/find.1.html

 

The file-system table which is where folder/directory structure is stored. delete a file and all you are doing is removing its entry from the table. This is why various programs are able to recover file data but not details like names and folder structure. You have to do this manually.

 

p.s. I prefer Backintime to any other backup program, it records snapshots and handles storage/deletion.

             ☼

ψ ︿_____︿_ψ_   

Link to comment
https://linustechtips.com/topic/781682-restore-deleted-files/#findComment-9855619
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×