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 服务器上的请求筛选被配置为拒绝该请求,因为查询字符串过长

    get请求方式中,传递的参数的值不能太多.是有长度限制的. http://test.jz.gaitu.cn:80/appMana/TemplateImgOutput.aspx?TemplateID=1 ...

  2. Easyui 加载树(easyui-tree)[dotnet]

    前台 html: <ul class="easyui-tree" id="ul_Tree" data-options="fit:true,ani ...

  3. 20141014--判断语句switch case

    1. switch case break(跳出) 距离break 最近的大括号,跳出这个大括号,执行大括号之后的命令 switch case 必须与 break 一同使用. 分别输入月份 几号 输出是 ...

  4. poj 3614 Sunscreen

                                                                                                        ...

  5. WiFi安全之WPA介绍

    WPA,全称为Wi-Fi Protected Access,是一种保护WiFi安全的系统,实现了IEEE 802.11i的大部分标准,是一种替代WEP的过渡方案. 这个协议包含了前向兼容RC4的加密协 ...

  6. makefile missing separator. Stop

    ifneq ($(KERNELRELEASE),) obj-m := hello.o else PWD := $(shell pwd) KVER := $(shell uname -r) KDIR : ...

  7. Mysql单实例脚本自动化安装

    安装包:mysql-5.6.31.tar.gz 已有配置文件:my.cnf *注意:本次Mysql的配置文件是在my.cnf的基础上更改得到的,my.cnf存放路径为/opt/rh/my.cnf 脚本 ...

  8. 51nod1256乘法逆元

    1256 乘法逆元 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注给出2个数M和N(M < N),且M与N互质,找出一个数K满足0 < K < ...

  9. 如何实现zs无限期试用

    要删除的文件有两个,分别是.zs与10_0..zs保存的是版本号,10_0保存的是注册码,这两个文件存在的原理是:zend studio 每次启动的会检查这两个文件的创建时间,和当前日期对比,超过30 ...

  10. 修正 phpcmsv9 VIP过期日期为1970

    打开 phpcms/modules/member/member.php 找到 $form_overdudate = form::date('info[overduedate]', date('Y-m- ...