On Tue, Aug 02, 2005 at 12:52:34PM +0200, Dario Freni wrote:
> Vasil Dimov wrote:
> > Even we can use
> > if [ -d /tmp -a -w /tmp ] ; then
> > or (which is equivalent)
> > if [ -d /tmp ] && [ -w /tmp ] ; then
> > and save external commands (mkdir) execution and directory
> > creation/deletion at all.
> 
> You can't use test -w here. The script is checking if there is a
> read-only filesystem. -w checks only the file flags (according to the
> man page, at least).
> 
That's correct, -w cannot be used to check read-only filesystem.

Attachment: pgpOMP99R16AY.pgp
Description: PGP signature



Reply via email to