[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Does [ -f FILE ] have a bug on testing a symlink ?
From: |
Cheng Rk |
Subject: |
Does [ -f FILE ] have a bug on testing a symlink ? |
Date: |
Mon, 9 Feb 2015 21:00:12 +0000 (UTC) |
To bug-bash@gnu.org:
According this documentation `help test`, I am expecting it should return false
on anything other than a regular file,
-f FILE True if file exists and is a regular file.
but why it returned true on a symlink to a regular file?
$ [ -f tmp/sym-link ] && echo true
true
- Does [ -f FILE ] have a bug on testing a symlink ?,
Cheng Rk <=
- Re: Does [ -f FILE ] have a bug on testing a symlink ?, Chet Ramey, 2015/02/09
- Re: Does [ -f FILE ] have a bug on testing a symlink ?, Ken Irving, 2015/02/09
- Re: Does [ -f FILE ] have a bug on testing a symlink ?, Evan Gates, 2015/02/09
- Re: Does [ -f FILE ] have a bug on testing a symlink ?, Eric Blake, 2015/02/09
- Re: Does [ -f FILE ] have a bug on testing a symlink ?, Bob Proulx, 2015/02/09
- Re: Does [ -f FILE ] have a bug on testing a symlink ?, Andreas Schwab, 2015/02/09