|
|
CpMac a bad choice
I don't know why Gary Kerbaugh decided to use CpMac in his rmm script (the script in question). CpMac is only included in the Developer Tools, a 300+MB download and optional install, so it will not be on every Mac.
% which CpMac /Developer/Tools/CpMacAdditionally, CpMac does not preserve permissions: Utility Preserves Permissions? Preserves Resource Forks & Creator/Type? cp yes no CpMac no yes ditto yes yes rsync yes no(Chart from: http://www.macdevcenter.com/pub/a/mac/2002/07/02/terminal_5.html) This may or may not be a problem, especially since the items are destined for deletion anyway. My pedantic nature, however, dictates preserving the file intact until it is actually removed from the filesystem. Therefore, I suggest replacing CpMac in Gary's script with ditto (thus recreating the file exactly, with both permissions and resource fork information intact). Additionally, ditto is part of the default OS X distribution, so it can be counted upon to be on any system upon which this script is deployed. % which ditto /usr/bin/ditto
CpMac a bad choice
Are you sure that ditto is not installed by the developer tools? I don't know,
but being in /usr/bin doesn't necessarily mean it's included in a default install.
For example, gcc was installed by the Developer tools (I'm almost certain):
CpMac a bad choice
Additionally, CpMac does not preserve permissions It does if you use the '-p' flag:
-p flag
The -p flag on CpMac does not mean the same thing as the -p flag on cp. Note the fine difference (from man CpMac):
CpMac - copy files preserving metadata and forks -p Causes CpMac to preserve in the copy as many of the modification time, access time, file flags, file mode, user ID, and group ID as allowed by permissions. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|