Avoid OSX Metadata on Network Shares

OSX saves .DS_Store and other resource-fork metadata files such as .Appledouble onto hard drives and network shares. These normally are completely invisible to a Mac OSX user, but once you start to browse the drives with different operating systems, you get all sorts of helpful files that can be annoying or get in your way.

These show up either with period, or as a hex number beginning with a : with netatalk, which allows a faster and more native sharing of APF over TCP. With FTP or SMB servers, you can ignore or veto the creation of these files.  A way to avoid copying resource forks & metadata to network shares, you can try this hint to disable it as a finder preference.

It seems like nobody has ever discovered that the Darwin OSX man page for the terminal command “cp”, which is used to copy a file or directory recursively, has built a SIMPLE parameter to completely skip any of these!

First, I mounted my network share, which is just called rayray using Finder’s Connect To Server menu item. This put rayray in /Volumes/rayray Then I can run cp with the -X parameter!

cp -vRX /path/to/folder /Volumes/rayray

This will show each file as it is copied and happily it goes *fast* and skips all of those files!

By the way, I still have to test NFS’s speed, but with netatalk using Appletalk over TCP Apple File Transfers, I get 50-60MB/s over a gigabit crossover cable as opposed to 30-35MB/s with Samba. Kinda neat :D

I want to point out that this person’s blog was the most helpful resource to getting Avahi-Daemon to advertise exactly what I wanted, so if you’re setting up a Linux server on your network with services that you want to appear in Finder, Terminal, and other places automagically, check out HolyArmy.org

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Post a Comment

Your email is never published nor shared. Required fields are marked *

Improve the web with Nofollow Reciprocity.