I wanted to copy a file using cp, however, I happened to type rm and the file was deleted.
How can I recover it?
The file is stored in a mobile hard disk drive with FAT32 file system
I'm using Mac OS X
Hoping someone can help me!
This question came from our site for professional and enthusiast programmers.
I've had good luck with TestDisk.
An example of how to use it to recover FAT32 data is here: http://www.cgsecurity.org/wiki/TestDisk:_undelete_file_for_FAT
It is a free download (works on a Mac) from here: http://www.cgsecurity.org/wiki/TestDisk_Download
Remember to mount the removable disk read-only so your data isn't overwritten somehow; copy your recovered files to your Mac HD.