[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

test -nt not sane

From: Curtis Doty
Subject: test -nt not sane
Date: Wed, 10 Aug 2011 11:53:52 -0700 (PDT)
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)

Or maybe I'm not groking. When one compares against a b0rk symlink, the result of -nt (newer than) is true--when it isn't!

  mkdir directory
  ln -s noexist symlink
  touch -hr directory symlink

  test directory -nt symlink &&echo yes ||echo no

They have identical mtimes (as set by touch)--i.e. the directory is *not* newer than the symlink--but it still outputs "yes". Why?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]