bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#270594: coreutils: Test manpage improvements (-e, -w and -x)


From: Paul Eggert
Subject: Re: Bug#270594: coreutils: Test manpage improvements (-e, -w and -x)
Date: Thu, 09 Sep 2004 16:24:56 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Javier Fernández-Sanguino Peña <address@hidden> writes:

> -FILE exists and is writable
> +FILE exists and is writable.  True indicates only that the write flag is 
> on.
> +The file is not writable on a read-only file system even if this
> +test indicates true

I see.  That wording is a bit verbose and doesn't describe all the
reasons why test -w FILE would succeed but writing to the file would
fail, so I installed the following patch instead.  Thanks for
following up on this.

2004-09-09  Paul Eggert  <address@hidden>

        * doc/coreutils.texi (test invocation):
        Document -r, -w, -x more carefully.
        * src/test.c (usage): Document -r, -w, -x more carefully.

Index: doc/coreutils.texi
===================================================================
RCS file: /home/eggert/coreutils/cu/doc/coreutils.texi,v
retrieving revision 1.210
diff -p -u -r1.210 coreutils.texi
--- doc/coreutils.texi  9 Sep 2004 23:02:12 -0000       1.210
+++ doc/coreutils.texi  9 Sep 2004 23:19:34 -0000
@@ -9512,12 +9512,12 @@ True if @var{file} exists and has its se
 @item -k @var{file}
 @opindex -k
 @cindex sticky bit check
-True if @var{file} has its @dfn{sticky} bit set.
+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 is readable.
+True if @var{file} exists and read permission is granted.
 
 @item -u @var{file}
 @opindex -u
@@ -9527,12 +9527,13 @@ True if @var{file} exists and has its se
 @item -w @var{file}
 @opindex -w
 @cindex writable file check
-True if @var{file} exists and is writable.
+True if @var{file} exists and write permission is granted.
 
 @item -x @var{file}
 @opindex -x
 @cindex executable file check
-True if @var{file} exists and is executable.
+True if @var{file} exists and execute permission is granted
+(or search permission, if it is a directory).
 
 @item -O @var{file}
 @opindex -O
Index: src/test.c
===================================================================
RCS file: /home/eggert/coreutils/cu/src/test.c,v
retrieving revision 1.107
diff -p -u -r1.107 test.c
--- src/test.c  9 Sep 2004 04:15:02 -0000       1.107
+++ src/test.c  9 Sep 2004 23:18:26 -0000
@@ -895,15 +895,15 @@ EXPRESSION is true or false and sets exi
   -L FILE     FILE exists and is a symbolic link (same as -h)\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 is readable\n\
+  -r FILE     FILE exists and read permission is granted\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 is writable\n\
-  -x FILE     FILE exists and is executable\n\
+  -w FILE     FILE exists and write permission is granted\n\
+  -x FILE     FILE exists and execute (or search) permission is granted\n\
 "), stdout);
       fputs (_("\
 \n\




reply via email to

[Prev in Thread] Current Thread [Next in Thread]