PDA

View Full Version : HELP!!!! Undo deletion in Terminal




Chef Medeski
Dec 28, 2005, 09:16 PM
The idiot I am, I decided to practice my Unix commands by cleaning out my iPhoto Library. Well guess what I hit cd .. one too many times and then just deleted the last folder accesses, which means instead of deleting one day folder that was empty. I deleted a whole month of family vacation in JULY!!!! :eek: :eek: :eek: :eek: :eek: :eek: HELP!!! I looked in the Trash Can and nothing. I don't know what to do, why did I have to procrastinate in backing up my harddrive. SOMEONE HELP!!!!



MacAficionado
Dec 28, 2005, 09:36 PM
The idiot I am, I decided to practice my Unix commands by cleaning out my iPhoto Library. Well guess what I hit cd .. one too many times and then just deleted the last folder accesses, which means instead of deleting one day folder that was empty. I deleted a whole month of family vacation in JULY!!!! :eek: :eek: :eek: :eek: :eek: :eek: HELP!!! I looked in the Trash Can and nothing. I don't know what to do, why did I have to procrastinate in backing up my harddrive. SOMEONE HELP!!!!

Sorry, no undo in terminal.

I take it, you don't back up.

Nermal
Dec 28, 2005, 09:46 PM
Step 1: STOP USING THE COMPUTER. Deleted files get overwritten by new data, and as long as you're using the system, new data is getting generated.

Step 2: Use a file-recovery tool. I think DiskWarrior can do this. It runs from its own CD and therefore doesn't overwrite your deleted files.

Flying Llama
Dec 28, 2005, 10:08 PM
DO NOT TOUCH YOUR COMPUTER!

You see, when you delete a file, the computer actually only deletes it from the index. Your files are most probably still there!

The point? You need to buy Data Rescue II (http://www.versiontracker.com/dyn/moreinfo/macosx/1133). It costs $99 but I'm sure it's worth your vacation pix. Good luck! :)

Chef Medeski
Dec 28, 2005, 10:59 PM
You have anything for free. Luckily I opened my iPod and noticed that instead of deleting a whole month it was actually only 20 pictures. I have the compressed versions on my iPod, so they are not totally lost, just compressed. So, if you have anything for free.

tag
Dec 29, 2005, 01:09 AM
I know this won't help you right now, but hopefully this will help you from doing this again. In your home directory (cd ~) edit your '.profile' file, or create it if you don't have it and add this line...

alias rm='rm -i'

That way, next time you delete something via 'rm' in terminal, you will be prompted asking you if you are sure, that way you can think about it for a second and recheck what you are deleting.

Or alternately you can do a bit of research and use alias and a logout script to create a trashcan type thing, where when you type 'rm' (via alias) you move the files to a temporary trashcan, say ~/.trash, instead of instantly deleting them, and then the logout script(executed through a .profile trap; a google search will explain how these work) would 'rm ~./trash' then 'mkdir ~/.trash' at logout cleaning out your trashcan when you logout.

greatdevourer
Dec 29, 2005, 03:38 AM
Or, if you know precisely what the folders/files are called, then you can try rm -w (I think - just check the man for it)