rm
abbr.room house; place; remove UNIX command; remove UNIX command
Linux rm command syntax
Function: The rm command is used to delete a file or directory.
Syntax: rm [options] name...
Linux rm command example
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: 無(wú)法刪除目錄"homework": 是一個(gè)目錄 # 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.