Linux rm -参数,linux rm命令

rm指令:删除文件或目录

首先 man rm

NAME

rm - remove files or directories

SYNOPSIS

rm [OPTION]... FILE...

DESCRIPTION

This manual page documents the GNU version of rm.  rm removes each specified file.  By default, it does not remove directories.

If  a  file  is unwritable, the standard input is a tty, and the -f or --force option is not given, rm prompts the user for whether to

remove the file.  If the response is not affirmative, the file is skipped.

OPTIONS

Remove (unlink) the FILE(s).

-f, --force

ignore nonexistent files, never prompt

-i, --interactive

prompt before any removal

--no-preserve-root do not treat ‘/’ specially (the default)

--preserve-root

fail to operate recursively on ‘/’

-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

rm -rf jaxb-xjc.jar

rm -rfv jboss-aop-asintegration-core.jar

已删除“jboss-aop-asintegration-core.ja

rm -rfvi jboss-aop-asintegration-jmx.jar

rm:是否删除 一般文件 “jboss-aop-asintegration-jmx.jar”? y

已删除“jboss-aop-asintegration-jmx.jar”

rm -rfi jboss-aop-asintegration-mc.jar rm:是否删除 一般文件 “jboss-aop-asintegration-mc.jar”? y

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值