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