Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How to recover files deleted with 'rm -rf'?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Tue Jun 25, 2013 4:16 pm    Post subject: [SOLVED] How to recover files deleted with 'rm -rf'? Reply with quote

Hello,everyone.
I created a symbolic link using 'ln' from a dictionary in my ntfs filesystem to ext4 filesystem.Now i want to relink it to another dictionary,so i try to delete the link.First i tried 'rm THE-LINK-NAME/' and it showed out 'is a dictionary';then i used 'rmdir THE-LINK-NAME/' and it said 'not a dictionary'.Without thinking twice,i typed 'rm -rf THE-LINK-NAME/',which of course have deleted the whole files under the dictionary.(Now i know i can remove the symbolic link using 'rm THE-LINK-NAME',without the slish.)
So,how can i recover the deleted files?I have googled it,and used ntfsprogs and testdisk to try to recover them,but ,the deleted files didn't show up,i can't find these files using these two tools.Is it because that i didn't delete these files in their real dictionary in ntfs(deleted them in symbolic-linked dictionary)?Can someone help me?
Thanks a lot!


Last edited by lijf on Thu Jun 27, 2013 3:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4915

PostPosted: Tue Jun 25, 2013 6:09 pm    Post subject: Reply with quote

see http://blog.bisect.de/2011/08/how-to-undelete-files-from-ext3ext4.html
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Wed Jun 26, 2013 5:37 pm    Post subject: Reply with quote

DaggyStyle wrote:
see http://blog.bisect.de/2011/08/how-to-undelete-files-from-ext3ext4.html

But the files were in NTFS filesystem.Maybe i haven't expressed clearly for my poor English.I created a symbolic link in my home folder (EXT4 filesystem) whose destination was a folder in NTFS.And i deleted the files under the folder through the link.But i can't find the deleted files with 'testdisk' or 'ntfsprogs'.Have i expressed myself cleraly?
Anyway,Thanks for your answer.
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4915

PostPosted: Wed Jun 26, 2013 5:39 pm    Post subject: Reply with quote

lijf wrote:
DaggyStyle wrote:
see http://blog.bisect.de/2011/08/how-to-undelete-files-from-ext3ext4.html

But the files were in NTFS filesystem.Maybe i haven't expressed clearly for my poor English.I created a symbolic link in my home folder (EXT4 filesystem) whose destination was a folder in NTFS.And i deleted the files under the folder through the link.But i can't find the deleted files with 'testdisk' or 'ntfsprogs'.Have i expressed myself cleraly?
Anyway,Thanks for your answer.


mu bad, I don't think that ntfs as a restore option, that is why trash was invented
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Wed Jun 26, 2013 5:49 pm    Post subject: Reply with quote

Ok,my really question is whether these files i have deleted accidently were in NTFS or in EXT4?I can't find these files when i chose NTFS partition where they were really stored using TESTDISK.
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Wed Jun 26, 2013 5:50 pm    Post subject: Reply with quote

DaggyStyle wrote:
lijf wrote:
DaggyStyle wrote:
see http://blog.bisect.de/2011/08/how-to-undelete-files-from-ext3ext4.html

But the files were in NTFS filesystem.Maybe i haven't expressed clearly for my poor English.I created a symbolic link in my home folder (EXT4 filesystem) whose destination was a folder in NTFS.And i deleted the files under the folder through the link.But i can't find the deleted files with 'testdisk' or 'ntfsprogs'.Have i expressed myself cleraly?
Anyway,Thanks for your answer.


mu bad, I don't think that ntfs as a restore option, that is why trash was invented


You mean i should restore them in ext4?
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Wed Jun 26, 2013 5:57 pm    Post subject: Reply with quote

Anyway,i will try your suggestion tomorrow.Battery low.
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4915

PostPosted: Thu Jun 27, 2013 5:04 am    Post subject: Reply with quote

lijf wrote:
DaggyStyle wrote:
lijf wrote:
DaggyStyle wrote:
see http://blog.bisect.de/2011/08/how-to-undelete-files-from-ext3ext4.html

But the files were in NTFS filesystem.Maybe i haven't expressed clearly for my poor English.I created a symbolic link in my home folder (EXT4 filesystem) whose destination was a folder in NTFS.And i deleted the files under the folder through the link.But i can't find the deleted files with 'testdisk' or 'ntfsprogs'.Have i expressed myself cleraly?
Anyway,Thanks for your answer.


mu bad, I don't think that ntfs as a restore option, that is why trash was invented


You mean i should restore them in ext4?


it depends where the directory was actually in and if you deleted the directory or the link.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1546

PostPosted: Thu Jun 27, 2013 10:24 am    Post subject: Reply with quote

If they don't appear in tools that can view deleted files (eg. testdisk), you'll need to use some kind of recovery software that tries to find these files (eg. photorec).
Back to top
View user's profile Send private message
creaker
Guru
Guru


Joined: 14 Jul 2012
Posts: 499

PostPosted: Thu Jun 27, 2013 11:23 am    Post subject: Reply with quote

it is weird that testdisk doesn't find deleted files. Usually testdisk renames files that was found and restores files regardless initial directories structure (file names and directory structure may be lost), so may be you was just disoriented with this renaming?
Anyway you can try photorec or R-Studio (R-Studio isn't a free, but it is a most powerful tool).
_________________
Intel Core i3-2120 / 4Gb RAM / 250Gb HDD / NVidia GeForce-550Ti
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Thu Jun 27, 2013 2:30 pm    Post subject: Reply with quote

DaggyStyle wrote:
lijf wrote:
DaggyStyle wrote:
lijf wrote:
DaggyStyle wrote:
see http://blog.bisect.de/2011/08/how-to-undelete-files-from-ext3ext4.html

But the files were in NTFS filesystem.Maybe i haven't expressed clearly for my poor English.I created a symbolic link in my home folder (EXT4 filesystem) whose destination was a folder in NTFS.And i deleted the files under the folder through the link.But i can't find the deleted files with 'testdisk' or 'ntfsprogs'.Have i expressed myself cleraly?
Anyway,Thanks for your answer.


mu bad, I don't think that ntfs as a restore option, that is why trash was invented


You mean i should restore them in ext4?


it depends where the directory was actually in and if you deleted the directory or the link.


It was in NTFS actually.And i deleted the directory.Using photorec i can find these files.Thank you!
But the partition is so large that photorec restores too many files to store in other smaller partitions.Worse than that is the name has changed,it's difficult to find them.
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Thu Jun 27, 2013 2:35 pm    Post subject: Reply with quote

TomWij wrote:
If they don't appear in tools that can view deleted files (eg. testdisk), you'll need to use some kind of recovery software that tries to find these files (eg. photorec).


It seems that photorec is a part of testdisk as to Gentoo.
Photorec can restore the deleted files,but it restore too many and the name has changed.Can i have a choice to choose which directory for Photorec to undelete?Or can it restore the deleted files which were deleted 1 days ago or other?
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Thu Jun 27, 2013 2:39 pm    Post subject: Reply with quote

creaker wrote:
it is weird that testdisk doesn't find deleted files. Usually testdisk renames files that was found and restores files regardless initial directories structure (file names and directory structure may be lost), so may be you was just disoriented with this renaming?
Anyway you can try photorec or R-Studio (R-Studio isn't a free, but it is a most powerful tool).


When i use testdisk,it didn't rename files and i can recognise the files it find,they aren't what i want to recover.
photorec is annoying as i said upper.
Thanks!
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1546

PostPosted: Thu Jun 27, 2013 2:46 pm    Post subject: Reply with quote

That means the files have been partially overwritten already; it is important that you don't use the system between loss of files and recovery, the more you use it the more files get corrupted or lost.
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Thu Jun 27, 2013 2:52 pm    Post subject: Reply with quote

My fault.I have changed to Windows and used the partition.
Now i try to restore them according their file types.But why there is no ppt or xls file types under the choice of photorec
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1546

PostPosted: Thu Jun 27, 2013 3:02 pm    Post subject: Reply with quote

It does, see http://www.cgsecurity.org/wiki/File_Formats_Recovered_By_PhotoRec for a full list; and even when it doesn't, you can add it.
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Thu Jun 27, 2013 3:24 pm    Post subject: Reply with quote

But i can't see some of the file formats.including xls,ppt.What's wrong?
Back to top
View user's profile Send private message
TomWij
Developer
Developer


Joined: 04 Jul 2012
Posts: 1546

PostPosted: Thu Jun 27, 2013 3:27 pm    Post subject: Reply with quote

According to the source code it should be there as "Microsoft Office Document (doc/xls/ppt/vsd/...), 3ds Max, MetaStock, Wilcom ES"; if not, seems it is somehow missing then.
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Thu Jun 27, 2013 3:27 pm    Post subject: Reply with quote

Oh,i see it.They are under the choice of doc.
Thanks a lot.
Back to top
View user's profile Send private message
lijf
n00b
n00b


Joined: 25 Jun 2013
Posts: 12
Location: China

PostPosted: Thu Jun 27, 2013 3:28 pm    Post subject: Reply with quote

TomWij wrote:
According to the source code it should be there as "Microsoft Office Document (doc/xls/ppt/vsd/...), 3ds Max, MetaStock, Wilcom ES"; if not, seems it is somehow missing then.


That's it.Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum