]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: test: clarify that -rwx don't just check perm bits
authorPádraig Brady <P@draigBrady.com>
Fri, 11 Mar 2022 12:47:05 +0000 (12:47 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 12 Mar 2022 13:19:06 +0000 (13:19 +0000)
* src/test.c (usage): State that -rwx is determined by
user access, rather than permission bits.
* doc/coreutils.texi (Access permission tests): Likewise.
* man/test.x [SEE ALSO]: access(2).
Fixes https://bugs.gnu.org/54338

doc/coreutils.texi
man/test.x
src/test.c

index 05dc5ee21f9515e974a529c2d6b7ecfeadb4331e..c9243c683961959c5b20d485155f2d9ed62c1f2d 100644 (file)
@@ -13451,7 +13451,7 @@ True if @var{file} exists and has its @dfn{sticky} bit set.
 @item -r @var{file}
 @opindex -r
 @cindex readable file check
-True if @var{file} exists and read permission is granted.
+True if @var{file} exists and the user has read access.
 
 @item -u @var{file}
 @opindex -u
@@ -13461,12 +13461,12 @@ True if @var{file} exists and has its set-user-ID bit set.
 @item -w @var{file}
 @opindex -w
 @cindex writable file check
-True if @var{file} exists and write permission is granted.
+True if @var{file} exists and the user has write access.
 
 @item -x @var{file}
 @opindex -x
 @cindex executable file check
-True if @var{file} exists and execute permission is granted
+True if @var{file} exists and the user has execute access
 (or search permission, if it is a directory).
 
 @item -O @var{file}
index 0adc35fee1552fcbf20efce3fb3798490affecdb..0db91dc9a7686ec6b9c945371fb43981b79bcf76 100644 (file)
@@ -1,3 +1,8 @@
+'\" Copyright (C) 1998-2022 Free Software Foundation, Inc.
+'\"
+'\" This is free software.  You may redistribute copies of it under the terms
+'\" of the GNU General Public License <https://www.gnu.org/licenses/gpl.html>.
+'\" There is NO WARRANTY, to the extent permitted by law.
 [NAME]
 test \- check file types and compare values
 [SYNOPSIS]
@@ -17,3 +22,5 @@ test \- check file types and compare values
 .I OPTION
 [DESCRIPTION]
 .\" Add any additional description here
+[SEE ALSO]
+access(2)
index 6daad3b3427e05ba3ebb8788228f60788aa6b1a9..cea7dc10dc289256f9bb7d250109b0e660f2bc34 100644 (file)
@@ -750,15 +750,15 @@ EXPRESSION is true or false and sets exit status.  It is one of:\n\
   -N FILE     FILE exists and has been modified since it was last read\n\
   -O FILE     FILE exists and is owned by the effective user ID\n\
   -p FILE     FILE exists and is a named pipe\n\
-  -r FILE     FILE exists and read permission is granted\n\
+  -r FILE     FILE exists and the user has read access\n\
   -s FILE     FILE exists and has a size greater than zero\n\
 "), stdout);
       fputs (_("\
   -S FILE     FILE exists and is a socket\n\
   -t FD       file descriptor FD is opened on a terminal\n\
   -u FILE     FILE exists and its set-user-ID bit is set\n\
-  -w FILE     FILE exists and write permission is granted\n\
-  -x FILE     FILE exists and execute (or search) permission is granted\n\
+  -w FILE     FILE exists and the user has write access\n\
+  -x FILE     FILE exists and the user has execute (or search) access\n\
 "), stdout);
       fputs (_("\
 \n\