I want to use the 'find' command and have it follow symbolic links. However, I need to call the command from other code (IDL, which doesn't have very nice built-in file searching) on both a RedHat and a Mac OS X system.
The problem is, the RedHat system uses GNU find version 4.1.20, while the mac find is some BSD version. In mac find, you use
find -L to follow symlinks. In the GNU version, you use
find -follow. There don't appear to be any common options between the two for following symbolic links.
A workaround for my machines is to change the
find to a private version of my own, but that is not an acceptable option for distributing the code. Can anyone recommend alternatives? Is there something in the
find manual I missed telling how to follow symbolic links that does not depend on the version?