Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Is it possible to save/restore HFS+ resource fork data from Linux?

Posted on 2008-10-01
Medium Priority
Last Modified: 2013-12-26
When I boot a Mac(running OSX) with a live linux CD, I can mount the HFS+ partition. If I tar a folder then untar it to a different location, when I reboot into OSX, the resource fork data is missing on the copy. How can I preserve it?
Question by:jasonzx
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 40

Expert Comment

by:Eoin OSullivan
ID: 22615622
Tar does not fully preserve OSX file attributes and has issues with long filenames  in addition to other issues ..
See this forum which explains

OSX uses ditto which preserves everything

I think rsync latest version will also support resource forks

Expert Comment

by:Alex Curylo
ID: 22650944
You'll have to do a little research to figure out exactly whatever your "live linux CD" does to present HFS+ resource forks. If it is conventional, at the same place as the data fork of <filename>, you will see


If that's not it exactly, it'll probably be something similar.

When you create an archive of that under Linux and then unarchive it somewhere else, Linux will create exactly what's in that archive. But what's in the archive is not the same as the internal HFS+ representation. So when you reboot to OS X, you have the data fork in <filename> and you have the resource fork in the path above or some close equivalent, which is invisible in the Finder by default since it starts with a period, and is not an actual HFS+ fork so it's not recognized as belonging to <filename>.

As resource forks have been deprecated in OS X for several years now, the state of support for this is vanishingly likely to improve. I strongly recommend that you examine whatever the OS X task is you're trying to accomplish; there is almost certainly a more modern workflow you could be using that eliminates the use of files with resource forks.

Expert Comment

by:Alex Curylo
ID: 22650953
"vanishingly likely to improve"

I meant vanishingly UNlikely there, of course.
Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.


Author Comment

ID: 22653911
The task I'm trying to accomplish is to mirror the data on one Mac running OSX to another Mac.
I've had limited success with a live Linux CD using piping the harddrive thru Tar and udp-sender. Some installed programs(Dreamweaver and Firefox specifically) show up as a folder called ''(instead of an application I can execute).
All the info I read seems to point to the fact that I'm not properly backing up and restoring the resource fork.
Supposedly there's a hfstar util that should do the trick but I've been unable to compile it under Linux(looks for header files I don't have and can't find)

Accepted Solution

Alex Curylo earned 2000 total points
ID: 22654090
"The task I'm trying to accomplish is to mirror the data on one Mac running OSX to another Mac."

By running Linux?? Yoiks. That's got epic fail written all over it :) If you want something lightweight, the Darwin source would be the place to start.

"Some installed programs(Dreamweaver and Firefox specifically) show up as a folder called ''(instead of an application I can execute)."

Actually, those *are* the applications you can execute. Whilst displayed as a single icon in the Finder without the ".app" extension, these folders -- the technical name is "bundles" -- have been the recommended way to create an OS X application since, well, as long as there has been an OS X. I'd be more surprised to find that you had any applications on the machine that were not .app folders, these days. And the main point of bundles was -- surprise! -- to eliminate a major use of resource forks.

"Supposedly there's a hfstar util that should do the trick but I've been unable to compile it under Linux(looks for header files I don't have and can't find)"

And I very sincerely doubt you will be able to in the Linux world. I'd look into using Darwin for whatever you're using Linux for, that's very likely your most promising way forward.

Author Comment

ID: 22654830
I started this project under Linux because I was more familiar with it. Considered using Darwin a while back but couldn't find any information on building a live Darwin CD. Don't suppose you know of a good tutorial for that?

Expert Comment

by:Alex Curylo
ID: 22656177
Unfortunately, nothing all that close exists so far. There's a project working on it here.

I imagine the people there would have some more knowledgeable perspectives for you on how to accomplish copying Mac volumes. I did some more googling around now that I'm kinda interested in the problem :) and I didn't see anything to change my impression that whilst you can read OS X volumes adequately using modern flavours of Linux, actually writing to them successfully is fraught with peril at the very very best.

However, if there is any solution to be found, it's almost certainly going to be with extracts from the Darwin source if not Darwin itself exactly, and the PureDarwin people would be the best on the planet to take that question up with, I imagine.

Author Closing Comment

ID: 31501991
Thanks Alex. You've been very helpful.

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The error "There was an error performing the update" occurred on a Mac OS X client workstation running  Symantec AntiVirus for Mac ( - the Enterprise product vers…
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question