View previous topic :: View next topic |
Author |
Message |
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Tue Jun 25, 2013 4:16 pm Post subject: [SOLVED] How to recover files deleted with 'rm -rf'? |
|
|
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 |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
|
Back to top |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Wed Jun 26, 2013 5:37 pm Post subject: |
|
|
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 |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Wed Jun 26, 2013 5:39 pm Post subject: |
|
|
lijf wrote: |
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 |
|
Back to top |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Wed Jun 26, 2013 5:49 pm Post subject: |
|
|
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 |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Wed Jun 26, 2013 5:50 pm Post subject: |
|
|
DaggyStyle wrote: | lijf wrote: |
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 |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Wed Jun 26, 2013 5:57 pm Post subject: |
|
|
Anyway,i will try your suggestion tomorrow.Battery low. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Thu Jun 27, 2013 5:04 am Post subject: |
|
|
lijf wrote: | DaggyStyle wrote: | lijf wrote: |
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 |
|
Back to top |
|
|
TomWij Retired Dev
Joined: 04 Jul 2012 Posts: 1553
|
Posted: Thu Jun 27, 2013 10:24 am Post subject: |
|
|
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 |
|
|
creaker l33t
Joined: 14 Jul 2012 Posts: 651
|
Posted: Thu Jun 27, 2013 11:23 am Post subject: |
|
|
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). |
|
Back to top |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Thu Jun 27, 2013 2:30 pm Post subject: |
|
|
DaggyStyle wrote: | lijf wrote: | DaggyStyle wrote: | lijf wrote: |
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 |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Thu Jun 27, 2013 2:35 pm Post subject: |
|
|
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 |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Thu Jun 27, 2013 2:39 pm Post subject: |
|
|
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 |
|
|
TomWij Retired Dev
Joined: 04 Jul 2012 Posts: 1553
|
Posted: Thu Jun 27, 2013 2:46 pm Post subject: |
|
|
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 |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Thu Jun 27, 2013 2:52 pm Post subject: |
|
|
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 |
|
|
TomWij Retired Dev
Joined: 04 Jul 2012 Posts: 1553
|
|
Back to top |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Thu Jun 27, 2013 3:24 pm Post subject: |
|
|
But i can't see some of the file formats.including xls,ppt.What's wrong? |
|
Back to top |
|
|
TomWij Retired Dev
Joined: 04 Jul 2012 Posts: 1553
|
Posted: Thu Jun 27, 2013 3:27 pm Post subject: |
|
|
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 |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Thu Jun 27, 2013 3:27 pm Post subject: |
|
|
Oh,i see it.They are under the choice of doc.
Thanks a lot. |
|
Back to top |
|
|
lijf n00b
Joined: 25 Jun 2013 Posts: 12 Location: China
|
Posted: Thu Jun 27, 2013 3:28 pm Post subject: |
|
|
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 |
|
|
|