[ksh93-integration-discuss] Re: [ast-users] Adding "-s" (="suppress") switch to ksh93/libcmd's "rmdir" buildin...
Roland Mainz
roland.mainz at nrubsig.org
Thu Aug 24 20:02:42 PDT 2006
Glenn Fowler wrote:
>
> I added rmdir -s,
Thanks! :-)
Did you add the "-C" switch to "wc", too ?
> but surely the diagnositic isn't suppressed when the
> the dir itself can't be removed?
It seems that "-s" disables all error output when "-p" is used.
Example (running this as plain user where "/usr" is non-empty and
readonly):
-- snip --
$ /usr/bin/rmdir -s /usr
/usr/bin/rmdir: directory "/usr": Search or write permission needed
$ /usr/bin/rmdir -s -p /usr
$ /usr/bin/rmdir -p /usr
/usr/bin/rmdir: directory "/usr": /usr not removed; Permission denied
$ /usr/bin/rmdir -s /usr/blabla_does_not_exist
/usr/bin/rmdir: directory "/usr/blabla_does_not_exist": Directory does
not exist
$ /usr/bin/rmdir -s -p /usr/blabla_does_not_exist
$ /usr/bin/rmdir -p /usr/blabla_does_not_exist
/usr/bin/rmdir: directory "/usr/blabla_does_not_exist":
/usr/blabla_does_not_exist not removed; No such file or directory
-- snip --
BTW: The source for the Solaris version of "rmdir" can be found at
http://cvs.opensolaris.org/source/xref/on/usr/src/cmd/rmdir/ and a
manual page from Solaris 9 at
http://docs.sun.com/app/docs/doc/817-0689/6mgfkpd2e?a=view#indexterm-686
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
More information about the ksh93-integration-discuss
mailing list