Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 28, 2005, 09:16 PM   #1
Chef Medeski
macrumors 6502a
 
Chef Medeski's Avatar
 
Join Date: Jun 2005
Location: New York, NY
HELP!!!! Undo deletion in Terminal

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!!!! 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!!!!
Chef Medeski is offline   0 Reply With Quote
Old Dec 28, 2005, 09:36 PM   #2
MacAficionado
macrumors 6502
 
Join Date: Oct 2002
Location: An awesome place
Quote:
Originally Posted by Chef Medeski
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!!!! 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.
__________________
17" iMac Intel Core Duo 1.5Gb RAM
MacAficionado is offline   0 Reply With Quote
Old Dec 28, 2005, 09:46 PM   #3
Nermal
Moderator
 
Nermal's Avatar
 
Join Date: Dec 2002
Location: Whakatane, New Zealand
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.
Nermal is online now   0 Reply With Quote
Old Dec 28, 2005, 10:08 PM   #4
Flying Llama
macrumors 6502a
 
Flying Llama's Avatar
 
Join Date: Aug 2004
Location: Los Angeles
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. It costs $99 but I'm sure it's worth your vacation pix. Good luck!
__________________
.__......__...._______......______....______
|..|.....|..|...\__......\..../..........\..\__.....\
|..|.....|..|....../..__..\_.|..Y...Y....\.../..__..\_
|..|__..|..|__..(____..../|__|__|..../..(____..../
|____/.|____/.........\./...........\./...........\./
Flying Llama is offline   0 Reply With Quote
Old Dec 28, 2005, 10:59 PM   #5
Chef Medeski
Thread Starter
macrumors 6502a
 
Chef Medeski's Avatar
 
Join Date: Jun 2005
Location: New York, NY
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.
Chef Medeski is offline   0 Reply With Quote
Old Dec 29, 2005, 01:09 AM   #6
tag
macrumors 6502a
 
tag's Avatar
 
Join Date: Apr 2005
Location: PA, US
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.
tag is offline   0 Reply With Quote
Old Dec 29, 2005, 03:38 AM   #7
greatdevourer
macrumors 68000
 
Join Date: Aug 2005
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)
greatdevourer is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Is there no other way to "undo" other than the awkward "shake to undo"? TH55 Jailbreaks and iOS Hacks 17 May 14, 2014 02:49 PM
Why no Undo in Android? MBX Alternatives to iOS and iOS Devices 0 Nov 28, 2013 08:53 AM
How can I undo Safari update? Please help. Queenredspecial Mac Basics and Help 0 Aug 16, 2012 12:48 AM
Undo iCloud bearcatrp iPhone 3 Jun 2, 2012 01:46 PM

Forum Jump

All times are GMT -5. The time now is 12:05 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC