Print this page
4815 Want rm support for -v option
4816 rm does not print error messages when -f is used

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man1/rm.1
          +++ new/usr/src/man/man1/rm.1
   1    1  '\" te
   2    2  .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
   3    3  .\" Copyright 1989 AT&T
   4    4  .\" Portions Copyright (c) 1982-2007 AT&T Knowledge Ventures
   5    5  .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
        6 +.\" Copyright 2014 Andrew Stormont.
   6    7  .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   7    8  .\" http://www.opengroup.org/bookstore/.
   8    9  .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   9   10  .\"  This notice shall appear on any product containing this material.
  10   11  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
  11   12  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
  12   13  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  13      -.TH RM 1 "Nov 20, 2007"
       14 +.TH RM 1 "Apr 30, 2014"
  14   15  .SH NAME
  15   16  rm, rmdir \- remove directory entries
  16   17  .SH SYNOPSIS
  17   18  .LP
  18   19  .nf
  19      -\fB/usr/bin/rm\fR [\fB-f\fR] [\fB-i\fR] \fIfile\fR...
       20 +\fB/usr/bin/rm\fR [\fB-f\fR] [\fB-i\fR] [\fB-v\fR] \fIfile\fR...
  20   21  .fi
  21   22  
  22   23  .LP
  23   24  .nf
  24      -\fB/usr/bin/rm\fR \fB-rR\fR [\fB-f\fR] [\fB-i\fR] \fIdirname\fR... [\fIfile\fR]...
  25      -.fi
  26      -
  27      -.LP
  28      -.nf
  29      -\fB/usr/xpg4/bin/rm\fR [\fB-fiRr\fR] \fIfile\fR...
       25 +\fB/usr/bin/rm\fR \fB-rR\fR [\fB-f\fR] [\fB-i\fR] [\fB-v\fR] \fIdirname\fR... [\fIfile\fR]...
  30   26  .fi
  31   27  
  32   28  .LP
  33   29  .nf
  34   30  \fB/usr/bin/rmdir\fR [\fB-ps\fR] \fIdirname\fR...
  35   31  .fi
  36   32  
  37   33  .SS "ksh93"
  38   34  .LP
  39   35  .nf
  40   36  \fB/usr/bin/rmdir\fR [\fB-eps\fR] \fIdirname\fR...
  41   37  .fi
  42   38  
  43   39  .SH DESCRIPTION
  44      -.SS "/usr/bin/rm /usr/xpg4/bin/rm"
       40 +.SS "/usr/bin/rm"
  45   41  .sp
  46   42  .LP
  47   43  The \fBrm\fR utility removes the directory entry specified by each \fIfile\fR
  48   44  argument. If a file has no write permission and the standard input is a
  49   45  terminal, the full set of permissions (in octal) for the file are printed
  50   46  followed by a question mark. This is a prompt for confirmation. If the answer
  51   47  is affirmative, the file is deleted, otherwise the file remains.
  52   48  .sp
  53   49  .LP
  54   50  If \fIfile\fR is a symbolic link, the link is removed, but the file or
↓ open down ↓ 30 lines elided ↑ open up ↑
  85   81  .sp
  86   82  .LP
  87   83  \fBrmdir\fR deletes each given directory. The directory must be empty and
  88   84  contain no entries other than \fB\&.\fR or \fB\&..\fR. If a directory and a
  89   85  subdirectory of that directory are specified as operands, the subdirectory must
  90   86  be specified before the parent, so that the parent directory is empty when
  91   87  \fBrmdir\fR attempts to remove it.
  92   88  .SH OPTIONS
  93   89  .sp
  94   90  .LP
  95      -The following options are supported for \fB/usr/bin/rm\fR and
  96      -\fB/usr/xpg4/bin/rm\fR:
       91 +The following options are supported for \fB/usr/bin/rm\fR only:
  97   92  .sp
  98   93  .ne 2
  99   94  .na
 100   95  \fB\fB-r\fR\fR
 101   96  .ad
 102   97  .RS 6n
 103   98  Recursively removes directories and subdirectories in the argument list. The
 104   99  directory is emptied of files and removed. The user is normally prompted for
 105  100  removal of any write-protected files which the directory contains. The
 106  101  write-protected files are removed without prompting, however, if the \fB-f\fR
↓ open down ↓ 9 lines elided ↑ open up ↑
 116  111  
 117  112  .sp
 118  113  .ne 2
 119  114  .na
 120  115  \fB\fB-R\fR\fR
 121  116  .ad
 122  117  .RS 6n
 123  118  Same as \fB-r\fR option.
 124  119  .RE
 125  120  
 126      -.SS "/usr/bin/rm"
 127      -.sp
 128      -.LP
 129      -The following options are supported for \fB/usr/bin/rm\fR only:
 130      -.sp
 131      -.ne 2
 132      -.na
 133      -\fB\fB-f\fR\fR
 134      -.ad
 135      -.RS 6n
 136      -Removes all files (whether write-protected or not) in a directory without
 137      -prompting the user. In a write-protected directory, however, files are never
 138      -removed (whatever their permissions are), but no messages are displayed. If the
 139      -removal of a write-protected directory is attempted, this option does not
 140      -suppress an error message.
 141      -.RE
 142      -
 143  121  .sp
 144  122  .ne 2
 145  123  .na
 146      -\fB\fB-i\fR\fR
      124 +\fB\fB-v\fR\fR
 147  125  .ad
 148  126  .RS 6n
 149      -Interactive. With this option, \fBrm\fR prompts for confirmation before
 150      -removing any files. It overrides the \fB-f\fR option and remains in effect even
 151      -if the standard input is not a terminal.
      127 +Print out the name of files and directories removed.
 152  128  .RE
 153  129  
 154      -.SS "/usr/xpg4/bin/rm"
      130 +.SS "/usr/bin/rm"
 155  131  .sp
 156  132  .LP
 157      -The following options are supported for \fB/usr/xpg4/bin/rm\fR only:
      133 +The following options are supported for \fB/usr/bin/rm\fR only:
 158  134  .sp
 159  135  .ne 2
 160  136  .na
 161  137  \fB\fB-f\fR\fR
 162  138  .ad
 163  139  .RS 6n
 164      -Does not prompt for confirmation. Does not write diagnostic messages or modify
 165      -the exit status in the case of non-existent operands. Any previous occurrences
 166      -of the \fB-i\fR option is ignored.
      140 +Removes all files (whether write-protected or not) in a directory without
      141 +prompting the user.
 167  142  .RE
 168  143  
 169  144  .sp
 170  145  .ne 2
 171  146  .na
 172  147  \fB\fB-i\fR\fR
 173  148  .ad
 174  149  .RS 6n
 175      -Prompts for confirmation. Any occurrences of the \fB-f\fR option is ignored.
      150 +Interactive. With this option, \fBrm\fR prompts for confirmation before
      151 +removing any files. It overrides the \fB-f\fR option and remains in effect even
      152 +if the standard input is not a terminal.
 176  153  .RE
 177  154  
 178  155  .SS "/usr/bin/rmdir"
 179  156  .sp
 180  157  .LP
 181  158  The following options are supported for \fB/usr/bin/rmdir\fR only:
 182  159  .sp
 183  160  .ne 2
 184  161  .na
 185  162  \fB\fB-p\fR\fR
↓ open down ↓ 84 lines elided ↑ open up ↑
 270  247  .SH USAGE
 271  248  .sp
 272  249  .LP
 273  250  See \fBlargefile\fR(5) for the description of the behavior of \fBrm\fR and
 274  251  \fBrmdir\fR when encountering files greater than or equal to 2 Gbyte ( 2^31
 275  252  bytes).
 276  253  .SH EXAMPLES
 277  254  .sp
 278  255  .LP
 279  256  The following examples are valid for the commands shown.
 280      -.SS "/usr/bin/rm, /usr/xpg4/bin/rm"
      257 +.SS "/usr/bin/rm"
 281  258  .LP
 282  259  \fBExample 1 \fRRemoving Directories
 283  260  .sp
 284  261  .LP
 285  262  The following command removes the directory entries \fBa.out\fR and \fBcore\fR:
 286  263  
 287  264  .sp
 288  265  .in +2
 289  266  .nf
 290  267  example% \fBrm a.out core\fR
↓ open down ↓ 105 lines elided ↑ open up ↑
 396  373  .sp
 397  374  .TS
 398  375  box;
 399  376  c | c
 400  377  l | l .
 401  378  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 402  379  _
 403  380  CSI     Enabled
 404  381  .TE
 405  382  
 406      -.SS "/usr/xpg4/bin/rm"
 407      -.sp
 408      -
 409      -.sp
 410      -.TS
 411      -box;
 412      -c | c
 413      -l | l .
 414      -ATTRIBUTE TYPE  ATTRIBUTE VALUE
 415      -_
 416      -CSI     Enabled
 417      -_
 418      -Interface Stability     Committed
 419      -_
 420      -Standard        See \fBstandards\fR(5).
 421      -.TE
 422      -
 423  383  .SS "ksh93"
 424  384  .sp
 425  385  
 426  386  .sp
 427  387  .TS
 428  388  box;
 429  389  c | c
 430  390  l | l .
 431  391  ATTRIBUTE TYPE  ATTRIBUTE VALUE
 432  392  _
↓ open down ↓ 63 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX