Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a set of ten years old archive CD-ROMs burnt on a OS9 Mac system by (potentially) choosing wrong options by a colleague. If mounted on the desktop of a recent MacOSX System (eg. 10.5.8 to 10.7) typically files with data in the resource fork (font files, aliases, text clippings, icon files) are displayed as empty files in the finder. Fortunately the data seems not to be lost finally (see the results below). I could retrieve the resource forks separated as files with the prefix "._".

Is there any known method to recombine/restore those separated hidden resource forks automatically with the main data to regular old style" macintosh files for a whole disk?

My results:

Copying the files back to disk with the finder via drag & drop does not solve the problem.

Copying the files via terminal with the "cp -r [source] [destination]" option has neither a success.

Using the alternative "cpmac" command instead of "cp2 has also no positive result.

Now if I use the "cp -r -p [source] [destination]" option, I get errors with some permission issues, but I find files with the same basenames but a prefix of "._" on the destination disk. These files seem to contain regular font file resource fork data.

The logged errors were for each file: cp [sourcefilepathwithprefix] : could not copy extended attributes to [destinationfilepathwithprefix] where prefix is "._"&[filename]

Annother minor issue is that the filenames contain "German umlauts" that were replaced with underscores. I cannot figure out if there is any retrievable information there to restore the original encoding.

I seems that the originally intended session containing the relevant hybrid mapping (HFS filesystem) for Apple Extensions was either lost or is now unreadable.

share|improve this question

migrated from stackoverflow.com Jun 7 '12 at 4:54

This question came from our site for professional and enthusiast programmers.

    
I'm a little uncertain what's on the CD vs. what cp is creating in emulating Mac filesystem metadata. Can you report the results of running ls -l /path/to/._sourcefile and file /path/to/._sourcefile? –  Gordon Davisson Jun 6 '12 at 3:30

1 Answer 1

If the resource forks are available under the names you're describing, here's a way to recombine them:

cp -a /source/filename /destination/filename
dd if=/source/._filename of=/destination/filename/..namedfork/rsrc

This will still not copy over the type/creator and other Finder metadata, but it will copy over the resource fork.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.