3
1
I need to edit extended attributes of directories that are symbolic links.
xattr that comes on OSX 10.5 unfortunately writes to the link target instead of the link itself.
I discovered a different version that supports a "-s" option to suppress following symbolic links. I checked it out of the repository, but there is no installer file that I can make out and I think I need one: https://xattr.svn.sourceforge.net/svnroot/xattr
Then I found another version and also checked it out, and was finally able to install it after installing Xcode:
However when I run this version I don't appear to get the magic "-s" option to suppress following symbolic links. In fact this version didn't appear to have any other options that the original xattr had.
Does anyone have a version of xattr running on OSX 10.5 that will support not following symbolic links, or any other app that will allow me to write extended attributes and not follow symbolic links ?
many thanks for yet another xattr :) I downloded the tar, extracted it, then "$ make" from the folder containing the Makefile. I then got the following: "gcc -o xattr xattr.c -std=c99 -O2 ld: can't open output file for writing: xattr collect2: ld returned 1 exit status make: *** [xattr] Error 1" I don't know how to make this makefile work :( Also thank you for the lesson in the definition of a symbolic link :) – timoto – 2011-05-07T15:25:11.750
@timoto: That looks like you do not have write access to the directory you are in. Did you perhaps extract it as root or another user? There should no need for sudo just to unpack this tar file and build the program. – Chris Johnsen – 2011-05-07T20:17:41.280
DOH! My hat off to you sir. Permissions mismatch indeed. Make as the user that extracted the tar works. I can now see a lovely "-P" in the xattr help and presumably "-s" (set) is write. Thank you Chris. – timoto – 2011-05-07T20:53:51.110
@timoto: Yes,
– Chris Johnsen – 2011-05-08T07:28:15.187-s
is for “set”. I neglected to mention the documentation. The documentation’s “source” isxattr.pod
. It is plain text, but the Pod markup might be a bit of a pain to “read around”. You can useman ./xattr.1
to read the documentation as a manpage.