rm可以用来删除文件和文件夹。 

rm --help

Usage: rm [OPTION]... FILE...

Remove (unlink) the FILE(s).





  -f, --force           ignore nonexistent files, never prompt(提示)

  -i                    prompt before every removal

  -I                    prompt once before removing more than three files, or

                          when removing recursively.  Less intrusive than -i,

                          while still giving protection against most mistakes

      --interactive[=WHEN]  prompt according to WHEN: never, once (-I), or

                          always (-i).  Without WHEN, prompt always

      --one-file-system  when removing a hierarchy recursively, skip any

                          directory that is on a file system different from

                          that of the corresponding command line argument

      --no-preserve-root  do not treat `/' specially

      --preserve-root   do not remove `/' (default)

  -r, -R, --recursive   remove directories and their contents recursively(递归地)

  -v, --verbose         explain what is being done

      --help     display this help and exit

      --version  output version information and exit





By default, rm does not remove directories.  Use the --recursive (-r or -R)

option to remove each listed directory, too, along with all of its contents.





To remove a file whose name starts with a `-', for example `-foo',

use one of these commands:

  rm -- -foo





  rm ./-foo





Note that if you use rm to remove a file, it is usually possible to recover

the contents of that file.  If you want more assurance that the contents are

truly unrecoverable, consider using shred.





Report rm bugs to bug-coreutils@gnu.org

GNU coreutils home page: <http://www.gnu.org/software/coreutils/>

General help using GNU software: <http://www.gnu.org/gethelp/>

For complete documentation, run: info coreutils 'rm invocation'>

Linux rm命令的更多相关文章

  1. Linux rm命令详解

    Linux rm命令 Linux rm命令用于删除一个文件或者目录 语法: rm [options] name... 参数解释: -f, --force 强制删除.忽略不存在的文件,不提示确认 -i ...

  2. 如何将Linux rm命令删除的文件放入垃圾箱

    因为rm命令删除的文件是不会放入垃圾箱的,所以无法恢复,下面小编就给大家介绍一种方法,通过替换Linux rm命令的方法,从而将rm命令删除的文件放入垃圾箱. 方法: 1. 在/home/userna ...

  3. 【初级】linux rm 命令详解及使用方法实战

    rm:删除命令 前言: windows中的删除命令大家都不陌生,linux中的删除命令和windows中有一个共同特点,那就是危险,前两篇linux mkdir 命令详解及使用方法实战[初级]中我们就 ...

  4. Linux—rm命令

    rm作用:用于删除一个文件或者目录,文件一旦通过rm命令删除,则无法恢复,所以必须格外小心地使用该命令.并且时刻清醒注意自己在哪个目录下面!! 命令格式:rm [选项] name 参数: -i 删除前 ...

  5. linux rm 命令

    1.命令格式: rm [选项] 文件… 2.命令功能: 删除一个目录中的一个或多个文件或目录,如果没有使用- r选项,则rm不会删除目录.如果使用 rm 来删除文件,通常仍可以将该文件恢复原状. 3. ...

  6. 【Linux】- rm命令

    Linux rm命令用于删除一个文件或者目录. 语法 rm [options] name... 参数: -i 删除前逐一询问确认. -f 即使原档案属性设为唯读,亦直接删除,无需逐一确认. -r 将目 ...

  7. Linux 删除命令rm

    Linux rm命令用于删除一个文件或者目录. 语法:rm [options] name... 参数: 1.-i 删除前逐一询问确认. 2.-f 即使原档案属性设为唯读,亦直接删除,无需逐一确认. 3 ...

  8. Linux常用命令详解—基于CentOS7

    ## Linux 目录- /:根目录,一般只存放目录,不存放文件- /bin -> /usr/bin:可执行二进制文件的目录,也是常用命令目录,如常用的命令 ls.cat.mv 等- /boot ...

  9. Linux命令学习总结:rm命令

    命令简介:   该命令用来删除Linux系统中的文件或目录.通常情况下rm不会删除目录,你必须通过指定参数-r或-R来删除目录.另外rm通常可以将该文件或目录恢复(注意,rm删除文件其实只是将指向数据 ...

随机推荐

  1. lstm-思想

    RNN(Recurrent Neural Network) 今天我这里讲到的RNN主要是上图这种结构的,即是Hidden Layer会有连向下一时间Hidden Layer的边,还有一种结构是Bidi ...

  2. Contoso 大学 - 9 - 实现仓储和工作单元模式

    原文 Contoso 大学 - 9 - 实现仓储和工作单元模式 By Tom Dykstra, Tom Dykstra is a Senior Programming Writer on Micros ...

  3. Linux学习三部曲(之一)

    作为.NET程序员,一直以来都是windows环境下工作,很少接触到linux系统.但是随着微软跨出跨平台这一步之后,相信.NET程序员在linux平台进行开发也会变得越来越寻常. 所以,今天这篇文章 ...

  4. [WCF]IIS部署到新系统

    最近为以前的一个企业部署软件的时候,接触到WCF,通过博客园大佬的系列文章和一些书籍,基本了解了一些.简单说也算是SOA一种方式,提供某种服务,可以理解为一个类库,供其他项目使用,可以做到业务分离.但 ...

  5. Js 赋值传值和引用传址

    赋值传值和引用传址 在JavaScript中基本数据类型都是赋值传值,复合数据类型都是引用传址(传地址) 基本数据类型的变量名和数据是直接存在"快速内存"(栈内存)中,而复合数据类 ...

  6. String 转Clob

    把String转Clob java.sql.Clob c = new javax.sql.rowset.serial.SerialClob("abc".toCharArray())

  7. Libcurl笔记一

    一:1,全局初始化及释放:CURLcode curl_global_init(long flags) flags: CURL_GLOBAL_ALL //初始化所有的可能的调用. CURL_GLOBAL ...

  8. Android 源码编译及常见错误及解决方法

    最近要往arm开发板上移植android系统,大大小小的问题遇到了太多太多,都是泪啊.本人初接触嵌入式开发,对问题的根源不是太了解,不过好在每解决一个问题,便记录一下.话不多说,正式罗列问题: hos ...

  9. [java学习笔记]java语言基础概述之函数的定义和使用&函数传值问题

    1.函数 1.什么是函数? 定义在类中的具有特定功能的一段独立小程序. 函数也叫做方法 2.函数的格式 修饰符   返回值类型    函数名(参数类型  形式参数1, 参数类型  形式参数2-) { ...

  10. js自运行函数

    学习闭包的基础知识: 函数声明 function fn(){ //这里是代码 }; fn(); //运行fn函数 与上面等价 var fn = function(){ //这里是代码 } fn(); ...