|
|
1.1 root 1: .\" Copyright (c) 1980 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)rm.1 6.1 (Berkeley) 4/29/85
6: .\"
7: .TH RM 1 "April 29, 1985"
8: .UC 4
9: .SH NAME
10: rm, rmdir \- remove (unlink) files or directories
11: .SH SYNOPSIS
12: .B rm
13: [
14: .B \-f
15: ] [
16: .B \-r
17: ] [
18: .B \-i
19: ] [
20: .B \-
21: ] file ...
22: .PP
23: .B rmdir
24: dir ...
25: .PP
26: .SH DESCRIPTION
27: .I Rm
28: removes the entries for one or more files from a directory.
29: If an entry was the last link to the file, the file is destroyed.
30: Removal of a file requires write permission in its directory,
31: but neither read nor write permission on the file itself.
32: .PP
33: If a file has no write permission and the standard input is a terminal,
34: its permissions are printed and a line is read from the standard input.
35: If that line begins with `y' the file is deleted, otherwise the file remains.
36: No questions are asked and no errors are reported when the
37: .B \-f
38: (force) option is given.
39: .PP
40: If a designated file is a directory,
41: an error comment is printed unless the optional argument
42: .B \-r
43: has been used. In that case,
44: .I rm
45: recursively deletes the entire contents of the specified directory,
46: and the directory itself.
47: .PP
48: If the
49: .B \-i
50: (interactive) option is in effect,
51: .I rm
52: asks whether to delete each file, and, under
53: .BR \-r ,
54: whether to examine each directory.
55: .PP
56: The null option
57: .B \-
58: indicates that all the arguments following it are to be treated as
59: file names. This allows the specification of file names starting with
60: a minus.
61: .PP
62: .I Rmdir
63: removes entries for the named directories, which must be empty.
64: .SH "SEE ALSO"
65: rm(1), unlink(2), rmdir(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.