http://qs1969.pair.com?node_id=817899


in reply to Re: "The stat preceding -l _ wasn't an lstat"?
in thread "The stat preceding -l _ wasn't an lstat"?

You're right I guess. Btw, I'm doing -f $file && ! -l $file (double call) now to prevent this error.

Replies are listed 'Best First'.
Re^3: "The stat preceding -l _ wasn't an lstat"?
by Tanktalus (Canon) on Jan 19, 2010 at 20:08 UTC

    Just reverse it, and it's ok. ! -l $file && -f _. The -f flag can work on lstat's output, whether the lstat found a link or not.