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. JDBC之初识

    JDBC(Java Data Base Connectivity,java数据库连接)是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问,它由一组用Java语言编写的类和接口 ...

  2. Cocos开发中性能优化工具介绍之使用Windows任务管理器

    说到Windows平台,我们很快就想到了Visual Studio 2012,然而Visual Studio 2012在这方面没有很好的工具.如果我们只是想知道大体上内存.CPU等在某一事件前后变化情 ...

  3. c# 简单的通用基础字典

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using Alif.Ali ...

  4. java新手笔记30 集合

    1.set/list package com.yfs.javase; import java.util.ArrayList; import java.util.Collection; import j ...

  5. IE浏览器打开 「兼容性视图」

    有些IE上的网页控件需要打开兼容性视图才能使用,不知道是Javascript的原因,还是CSS的原因. 使用环境是用C语言配合boa服务器实现的CGI程序.

  6. 【原】GO 语言常见错误

    1. Scan error on column index 4: converting string "" to a int: strconv.ParseInt: parsing ...

  7. Unity基本操作一

    1,使对象进入摄像机镜头内align with view 2,太阳光 创建点point light,调节Intensity改变光照强度,上面的Range改变光照范围. 3,Animation选中Pla ...

  8. iOS SEL的简单总结

    @interface Person : NSObject + (void)test1; - (void)test2; @end // 根据.h文件中定义的Person类和方法 执行完这行代码 在内存中 ...

  9. IIS6,IIS7 最简单的重写URL

    虽然现在很少用IIS6,今天突然要把项目搬到老的服务器上(IIS6),对项目还要重新部署一下. 主要把时间花在了对url的重写上.其实很简单,如下: IIS6 网站 → 属性 → 主目录 → 配置 → ...

  10. JQ跑马灯

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...