Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I really need help!

Some very important script files e.g. .php and .js have been deleted with the php unlink function (on a mac), i need to recover these files. I tried a couple of programs but I don't think they look for .php and .js files. Which program should I use?

(The price of the program is irrelevant.)

share|improve this question

migrated from stackoverflow.com Jun 23 '12 at 22:12

This question came from our site for professional and enthusiast programmers.

    
I haven't used it, but prosofteng.com/products/data_rescue.php And fucking immediately turn off that machine! –  biziclop Jun 23 '12 at 19:13
    
Oh man. Sorry, probably the wrong StackExchange site for this question, but that sucks. Unless you've reformatted your hard drive and overwritten it with dd or whatever other data, you're looking at a hard drive ISO and some expertise. I would give it to a trusted specialist and not do it yourself if you really want to save it with the greatest chance of doing so. –  Jared Farrish Jun 23 '12 at 19:24
    
Does this unlink function delete it completely... because it sounds like it just removes a link to it in your file system. But the file will still be somewhere until you use up more space on your harddrive. –  jamcoupe Jun 23 '12 at 19:30
    
@jamcoupe you are correct. It just deletes the entry. –  Cole Johnson Jun 23 '12 at 22:00
add comment

1 Answer

up vote 0 down vote accepted

There is no way to get it back without special tools. unlink deletes it immediately. Not to the trash like you would think. Rarely do I see a file or folder delete function that will send it to the trash without some kernel calls. If you were on Windows, you could use Recuva by Piriform.

The reason you can get it back is that when a file is deleted, its file entry is really marked as deleted. Recuva looks at all the file entries and shows you ones that are marked as deleted. I'm not aware of a Mac tool that will help you. But your best bet is to get the hell away from the machine and take it to a computer professional.

share|improve this answer
    
Thanks. As the only answer. You get the "best answer". I used Data rescue 3 to recover my files eventually. I also used the google chrome cache to restore some other files. –  Ilya Karnaukhov Jul 3 '12 at 18:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.