how to recover files taht got deleted by rm -ef * ?
Hi
Probably this is old questions, but didnt find the exact one. I deleted files very inportant (.pdf,.gif, .jpeg etc) from my pen drive accidently. OS: Linux AS 4. file system ext3. Command used : rm -rf * Is there any way to recover it? thanks in advance. Regards... |
if am not wrong you can recover them if you are under ext2 ( am not so sure about this ) when you do rm ,the file contents are not actually deleted ,they are still on your HDD its just the link that is deleted. Its always best to have a hardlink of your important data,so that if one file is deleted by mistake,the contents of the file can be still access via the other link.
http://www.osscamp.in/blog/how-recov...command-ext3fs See this if it helps,i never tried it myself. |
First use dd to copy pen drive contents to a file on your hard disk:
Code:
mkdir /root/pendrive Next try PhotoRec to recover data from pendrive.img file. |
Quote:
But it's a very good idea to take an image before you start playing with recovery tools (because your pendrive is un-written to, and therefore untouched by "recovery" tools ) :) A better way to do it might be: Code:
dd if=/dev/sda1 of=~/pendrive.img # copy the data over, bit-by-bit , so you have an image Now the image is mounted at ~/pendisk just as if it was a real disk. Run your recovery tools on that. If you mess up, you can always re-image your pendrive ( dd if=/dev/sda1 of=~/pendrive.img ) and start again. Welcome to LQ! |
So is it possible to recover something that has been rmed ?? Nice info w1k0 and tredger.
|
thanks
Thanks to all.
But i am still unable to recover the file. The error is 0 files saved in /home/recovery/recup_dir. cannot create file in current durectory. i have given 777 file permissons. Can any one help please. thanks... |
All times are GMT -5. The time now is 05:09 AM. |