On Wed, Aug 10, 2011 at 11:53:52AM -0700, Curtis Doty wrote:
> touch -hr directory symlink
touch: illegal option -- h
Hmm, what is that? Let's check a GNU/Linux box:
-h, --no-dereference
affect each symbolic link instead of any referenced file (useful
only on systems that can change the timestamps of a symlink)
No wonder I've never seen it before....
> test directory -nt symlink &&echo yes ||echo no
That leads me to wonder what value bash is actually using when it
tries to compare the timestamp of a broken symlink. I'd expect it to
use the timestamp of the thing pointed to, but if there's nothing
being pointed to, is it using 0? As in 1970-01-01 00:00 UTC?
That would certainly explain your result.