Linux rm command
Translation results:
rm
abbr.room house; place; remove UNIX command; remove UNIX command
Linux rm commandsyntax
Function: The rm command is used to delete a file or directory.
Syntax: rm [options] name...
Linux rm commandexample
You can use the rm command directly to delete files. If you want to delete a directory, you must use the option "-r", for example:
# rm test.txt rm:是否删除 一般文件 "test.txt"? y # rm homework rm: 无法删除目录"homework": 是一个目录 # rm -r homework rm:是否删除 目录 "homework"? y
Delete all files and directories in the current directory. The command line is:
rm -r *
Once a file is deleted through the rm command, it cannot be recovered, so this command must be used with extreme caution.