https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234498
Bug ID: 234498
Summary: Request for additional switches in /bin/test
Product: Base System
Version: 12.0-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
It is often needed by users to test for files and directories in the
filesystem:
[ -f <abc> ]
[ -d <xyz> ]
While the tests above work as intended, the tests fail if the entities <abc> /
<xyz> are symbolic links. The user often wants to find out:
Is <abc> a regular file ? Or alternatively, is <abc> a symlink pointing to a
regular file ? (Both cases acceptable)
Is <xyz> a directory ? Or alternatively, is <xyz> a symlink pointing to a
directory ? (Both cases acceptable)
The tests above need additional switches, perhaps -F and -D :
-F returns true for regular file as well as valid symlink pointing to regular
file.
-D returns true for directory as well as valid symlink pointing to directory.
Thanks for any action taken on this request.
Manish Jain
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"