OT: Dittoing Resource Forks (WasLRe: Really delete a file via AppleScrip
OT: Dittoing Resource Forks (WasLRe: Really delete a file via AppleScrip
- Subject: OT: Dittoing Resource Forks (WasLRe: Really delete a file via AppleScrip
- From: Jonathan Levi MD <email@hidden>
- Date: Sun, 3 Aug 2003 16:52:58 -0400
On Sun, 3 Aug 2003 16:05:50 +0100, John Delacour <email@hidden> wrote:
...it's also extremely rude to remove a whole /Users directory...
A certain program did just that for me about an hour ago and you can
imagine roughly how I felt about that.
If I had panicked, that would have been that. If I had restarted
the machine, I would have lost EVERYTHING.
I made a lucky guess and put into practice the tiny bit of UNIX I
know. First I did a find in the Terminal looking for a unique
filename that I knew I'd lost in the conflagration. This put me
onto /.Trashes/501/ and there, sure enough was /jd/ with all its
contents.
I then created a folder "Rescued" on my newly wiped out Desktop and typed
sudo ditto jd ~/Desktop/Rescued
That's not the end of it. None of the files moved to .Trashes any
longer has a resource fork. That is toasted in the move, so my
careful use of ditto to duplicate the files was in vain.
Well, my knowledge of Unix is fairly limited, so the "ditto" command
was new to me. Thank you for showing it to me! However, in doing "man
ditto" I then noted the following option and description:
-rsrcFork
Preserve resource forks and HFS meta-data. ditto will store this
data in AppleDouble files on file-systems that do not support
resource forks.
Merely moving the file to .Trashes does not delete a file's resource
fork. Also, I believe that ditto would have created the directory
~/Desktop/Rescued automatically if it wasn't there.
"and gladly wolde he lerne and gladly teache...", or something like (Chaucer),
Jonathan
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.