File recovery

Hi,

Please let me know the way to recover the files deleted from home directory by 'rm*' command .

Thanks in advance.

With a restore.

You do have a backup, right?

No I dont have back up.

Can we roll back rm command?

That's what backups do for you. If you have no backup, then, you don't have a backup...

The best you can do is stop using the disk immediately -- and I mean stop using it, no writing to it at all, if you can't shut off the machine then remount the filesystem read-only. Any write has a chance of overwriting part or all of the deleted file. Then figure out the right raw-data recovery tool for use on your system. Something like magicrescue may work depending on what your system is and what you deleted. I can't predict what your odds of retrieving it are.

If you deleted a whole tree and not just one file, if you get back anything at all you're likely to get back a disorganized mess of instead of a nicely organized tree.

I would just add, that it would be useful to tell us about your environment (OS + version, dedicated or virtual, etc.).

For example, I don't take backups of my VM's, but I know that I have a Time Machine backup of my Mac, so if push came to shove, I could get the VMDK files back, and recover my files another way.

Knowing as much about your setup could help someone help you.

First of all, download your program to a usb key and make sure it is self contained, no setup or what no! Like photorec for linux. Just a pointer.

I'm at something of a loss to emphasise the un-importance of this particular advice at such a time.

ravigupta2u will surely be more aware of the need to back up important data after this experience. But I would no more trust the reliability of a USB stick to save my important data than I would UBS to not invest in something really dumb, right now.

No no, i'm saying not to install a program on the hard drive which would defeat the purpose of recovering any files. The USB key would only be to contain the program that would access the hard drive for file recovery.
Best would be, if no other means, to boot from recovery usb key and that way no data would be written at all, but then need more info.

---------- Post updated at 02:13 PM ---------- Previous update was at 02:11 PM ----------

woops 2 times

Your original post there was put in the moderation queue... I think USB tripped the SPAM filter - or maybe UBS did? :smiley:

Anyhoo, we're getting "prevention" and "cure" mixed up.

I'm sure that ravigupta2u will be all the wiser moving forward :b:

His initial post seemed to indicate needing immediate recovery of lost files and asking him if he had backups seemed redundant in the least. Your point was made and I am sure he will do it for next time, but, now is about recovery If I understand correctly. Getting back his files, this is what I answered after your comments. I'm not sure why your so high up on this, I guess your title makes you all knowing!

:wall:

The advice he's given so far is probably the most useful -- look for accidental/old copies kept elsewhere. Complete, organized data from an old copy is probably still better than the disorganized, fragmentary data you'd get from a disk trawl, newer or not...

Without more detailed information on his system and situation, any detailed advice we give is likely to be counterproductive. :frowning: You can't USB-boot a virtual server, for instance, so that's not good generic advice... magicrescue can't find datafiles it can't recognize, for another. And so forth. Scott did ask for more info and we have no reply as of yet...