Use of the information contained in this unapproved document is at your own risk
.Last update: 20 April,2001
1003.2-92 #75
_____________________________________________________________________________
Interpretation Number: XXXX
Topic: rm -R
Relevant Sections: 4.53
Interpretation Request: (Defect Report)
-----------------------
Date: Fri, 2 Sep 1994 13:16:36 -0700
I would like to an request official, binding interpretation from the
IEEE concerning the following point in IEEE Std 1003.2-1992 (POSIX.2).
POSIX.2 Subclause 4.53 specifies the semantics of the "rm" utility. My
question has to do with the correct behavior of "rm" when it is applied
to a directory, the -R flag is used, and standard input is a terminal.
If directory Dir is nonempty and has mode dr-xr-xr-x (i.e., is not
writeable), and the command
rm -R Dir
is issued, then
(a) Should the system prompt the user to ask whether Dir should be
removed?
(b) If the answer to (a) is yes, and the user responds affirmatively,
should Dir and its contents be removed?
Thank you for your attention to this matter.
Interpretation response:
-------------------------
Question a)
Yes. The standard clearly states the behaviour in item 2b on page 401, and
conforming implementations must conform to this.
Question b)
If the answer to item 2b is yes, it then proceeds to item 2c. It
attempts to remove the directory's contents and then according to item 4 it
attempts to remove the directory.
The standard clearly states the behaviour for directory removal, and
conforming implementations must conform to this.
Rationale
-------------
None.
Forwarded to Interpretations group: 4 Sep 94
Proposed resolution sent for review: 19th Nov 94
Resolved: 10th Dec 94