I accidentally deleted one of my source files from on a Mac using rm. I could rewrite it - its not worth buying a program to recover this one file.

link|improve this question

3  
You are not using TimeMachine, are you? – Thilo Feb 11 '10 at 7:22
Its on the Mac, but not set up. Snow Leopard – Casebash Feb 11 '10 at 22:35
feedback

3 Answers

up vote 3 down vote accepted

As Mac OS is more or less a normal UNIX, you can follow these instructions. But I wouldn't go into single user mode, as I don't know how Mac OS behaves here.

Or try Data Rescue. I read somewhere that one can recover one file at a time with the demo version.

Besides Time Machine, you should also consider to use a version control system like Git which adds a lot more benefits than just "recover" accidentally deleted files.

link|improve this answer
I am using SVN, unfortunately I forgot to SVN add – Casebash Feb 11 '10 at 22:36
I tried the unix instructions, but got the message resource busy :-( – Casebash Feb 11 '10 at 22:52
1  
@Casebash: This is because the hard disk is in use (I guess it is your main hard disk). You could boot with a linux live cd like Knoppix or Ubuntu and try again. – Felix Feb 12 '10 at 0:31
Ended up just rewriting the file. Accepted this answer as it is the best here, but I haven't verified that those instructions worked – Casebash Feb 20 '10 at 6:26
feedback

I would comment but I can't. Did you try using the disk device instead of the partition? I think that should work.

eg.

sudo grep ... /dev/disk0
link|improve this answer
feedback

Boomerang allows a free trial - might be enough to get a small file back.

For the future Time Machine!

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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