Recovering text files in terminal using grep on Mac OS X Snow Leopard
Posted
by littlejim84
on Super User
See other posts from Super User
or by littlejim84
Published on 2010-02-18T17:40:50Z
Indexed on
2010/04/02
0:03 UTC
Read the original article
Hit count: 321
I foolishly removed some source code from my Mac OS X Snow Leopard machine with rm -rf when doing something with buildout. I want to try and recover these files again. I haven't touched the system since to try and seek an answer.
I found this article and it seems like the grep method is the way to go, but when running it on my machine I'm getting 'Resource busy' when trying to run it on the disk.
I'm using this command:
sudo grep -a -B1000 -A1000 'video_output' /dev/disk0s2 > file.txt
Where 'dev/disk0s2' is what came up when I ran df
.
I get this when running:
grep: /dev/disk0s2: Resource busy
I'm not an expert with this stuff, I'm trying my best. Please can anyone help me further? I'm on the verge of losing two days of source code work!
Thank you
© Super User or respective owner