Send to a Friend

robmandu's avatar

How do deal with Mac's Display Names concept when coding at the OS level?

Asked by robmandu (21331points) May 27th, 2008

First, read about Display Names.

Okay, that describes the exact opposite of the problem I’m having. I’ve noticed that the filesystem names (available using “df -h” within the Terminal), are not static. For example, your main drive is, in the Finder interface, named “Macintosh HD”. At the underlying UNIX level, the default is to mount that filesystem with the name ”/Volumes/Macintosh HD”... but it doesn’t have to!

Depending on what’s going on, the filesystem might mount with a modified name, like ”/Volumes/Macintosh HD 1”... even though at the Finder level, it still appears on your desktop as plain old “Macintosh HD”.

I’m specifically worried about UNIX utilities like rsync (used by many of the off-the-shelf Mac-based backup programs). How do they get around that problem? Or do they even? (I think they might not.)

I can manually modify the filesystem mount name… but obviously prefer not to. Is there a coding convention to overcome this situation from the UNIX side? Or how can I prevent the auto-renaming from happening?

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.