⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rm.1

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 1
字号:
.\" SCCSID: @(#)rm.1	8.1	9/11/90.TH rm 1.SH Namerm, rmdir \- remove (unlink) files or directories.SH Syntax\fBrm\fR [\fB\-f\fR] [\fB\-r\fR] [\fB\-i\fR] [\fB\-\fR] \fIfile-or-directory-name....br\fBrmdir\fI directory-name....SH Description.NXR "rm command".NXR "rmdir command (general)".NXR "file" "removing".NXR "directory" "removing"The.PN rmcommand removes the entries for one or more files from a directory.If there are no links to the file then the file is destroyed.For further information, see .MS ln 1 . .PPThe.PN rmdircommand removes entries for the named directories, which must beempty.  If they are not empty, the directories remain, and.PN rmdir displays an error message (see EXAMPLES)..PPTo remove a file, you must have write permission in its directory,but you do not need read or write permission on the file itself.When you are using.PN rmfrom a terminal, and you do not have write permission on the file, the.PN rmcommand asks for confirmation before destroying the file. .PPIf input is redirected from the standard input device (your terminal),then.PN rmchecks to ensurethat input is not coming from your terminal.  If not, .PN rmsets the \fB\-f\fR option, which overrides the file protection,and removes the files silently, regardless of what you havespecified in the file redirected as input to .PN rm .See EXAMPLES..SH Options.NXR "rm command" "options".IP \fB\-\fR 5Specifies that the named files have namesbeginning with a minus (for example.PN \-myfile)..IP \fB\-f\fR Forces the removal of file or directory without first requesting confirmation.  Only system or usage messages are displayed..IP \fB\-i\fR  Prompts for yes or no response before removing each entry.  Does not ask when combined with the \fB\-f\fR option.  If youtype a y, followed by any combination of characters, a yes response is assumed..IP \fB\-r\fR Recursively removes all entries from the specified directory and, then, removes the entry for that directory from its parent directory.  .SH ExamplesThe following example shows how to remove a file inyour current working directory..NXR(e) "rm command" "removing file".EXrm myfile.EEThis example shows use of the null option to removea file beginning with a minus sign..EXrm \- \-gorp.EEThis example shows how a confirmation is requested for removal of a file for which you do not havewrite permission..NXR(e) "rm command" "confirming file removal".EXrm testfilerm: override protection 400 for testfile? y.EEThis example shows how the combination of \fB\-i\fRand \fB\-r\fR options lets you examine all the files in adirectory before removing them.   .NXR(e) "rm command" "examining files"In the example,mydirectoryis a subdirectory of the current working directory.Note that the last question requests confirmation before removing the directory itself.  Although the usertypes ``y'', requesting removal of the directory,the .PN rmcommand does not allow this, because the directoryis not empty; the user typed ``n'' to the questionabout the file.I file2 ,so .I file2was not removed..EXrm \-ir mydirectoryrm: remove mydirectory/file1? yrm: remove mydirectory/file2? n      .      .      .rm: remove mydirectory? yrm: mydirectory: Directory not empty.EEThis example illustrates that .PN rmoverrides file protection when input is redirected fromthe standard input device.  The user creates a filenamed ``alfie'', with a read-only file protection.  Theuser then creates a file named ``ans'' to contain thecharacter ``n''.  The.PN rm commandfollowing destroys the file ``alfie'', even though theredirected input file requested no deletion..EXcat > alfiehello^dchmod 444 alfiecat > ansn^drm < ans alfie.EE.SH See Alsounlink(2)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -