Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Dec 2018 22:59:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 234498] Request for additional switches in /bin/test
Message-ID:  <bug-234498-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234498

            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: bugs@FreeBSD.org
          Reporter: bourne.identity@hotmail.com

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 regul=
ar
file.
-D returns true for directory as well as valid symlink pointing to director=
y.


Thanks for any action taken on this request.
Manish Jain

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-234498-227>