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. Web前端开发:SQL Jsp小项目(一)

    Jsp的学习算是告一段落,针对这段时间的学习,写了一个Jsp小项目来巩固学到的知识. 框架示意图 User list process UserAdd process 需要的界面效果: 需要工具:Ecl ...

  2. Cocos开发中Visual Studio下HttpClient开发环境设置

    Cocos2d-x 3.x将与网络通信相关的类集成到libNetwork类库工程中,这其中包括了HttpClient类.我们需要在Visual Studio解决方案中添加libNetwork类库工程. ...

  3. Swift使用闭包表达式

    Swift中的闭包表达式很灵活,其标准语法格式如下:{ (参数列表) ->返回值类型 in    语句组}其中,参数列表与函数中的参数列表形式一样,返回值类型类似于函数中的返回值类型,但不同的是 ...

  4. WebResponse 取出全国省市区的邮编

    WebResponse用法(根据省市区地址查询其邮编): class Program { static string url { get; set; } static void Main(string ...

  5. 【转载】茶叶蛋干货!《超容易的Linux系统管理入门书》(连载十)进行动态主机配置DHCP

    使用动态主机配置协议DHCP(Dynamic Host Configuration Protocol)则可以避免网络参数变化后一些繁琐的配置,客户端可以从DHCP服务端检索相关信息并完成相关网络配置, ...

  6. 使用thinkPHP框架实现删除和批量删除一例【原创】

    本文为作者原创,转载请注明原作者及转载地址. 上一篇讲了如何用thinkPHP框架实现数据的添加,那这一篇就讲一下如何用thinkPHP实现数据的删除和批量删除吧. 预期效果图: 原谅博主对照片的处理 ...

  7. GC日志补充

    根据日志,确实发生了FullGC,计算资源被耗光 Java HotSpot(TM) 64-Bit Server VM (24.79-b02) for windows-amd64 JRE (1.7.0_ ...

  8. Eclipse中将项目导出jar包,以及转化成exe的方法

    Eclipse中将项目导出jar包,以及转化成exe的方法 http://wenku.baidu.com/view/385597f07c1cfad6195fa7c6.html

  9. CSS3.0动画之hover---Y轴----3D旋转

    div#div2{display: table; width: 100%; height: 100%; text-decoration: none; outline: none; -webkit-tr ...

  10. mongodb 级联操作查询时,关联条件

    ObjectId id=new ObjectId("123"); c=c.where("relation_type.$id").is(id);