.
Last update: 1997-05-20
9945-2-75 _____________________________________________________________________________ Topic: rm -R Relevant Sections: 4.53 Defect Report: ----------------------- Date: Fri, 2 Sep 1994 13:16:36 -0700 From: Fred Zlotnick <[email protected]> I would like to an request official, binding interpretation from the WG15 concerning the following point in ISO/IEC 9945-2:1993 (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