Linux Delete folder instance:
Rm-rf/var/log/httpd/access
The/var/log/httpd/access directory and all the files and folders under it will be deleted
Linux Delete Folder command
Linux Delete file instance:
Rm-f/var/log/httpd/access.log
Will force deletion of/var/log/httpd/access.log this file
-R is recursive down, no matter how many levels of directory, delete
-F is simply forced to delete, without any hint of the meaning
-I for interactive deletion.
recursively delete files in directory
Direct RM is OK, but add two parameters-rf namely: RM-RF directory Name
-R is recursive down, no matter how many levels of directory, delete
-F is simply forced to delete, without any hint of the meaning
Find. -name ' *.exe '-type f-print-exec rm-rf {} \;
(1) "." means to start a recursive lookup from the current directory
(2) "-name ' *.exe '" to find by name, to find all folders or files ending with. exe
(3) "-type F" Lookup type is a file
(4) "-print" Output lookup file directory name
(5) The most important thing is the-exec, the-exec option follows a command to execute, indicating that the file or directory you are going to execute the command. The EXEC option follows the command or script to be executed, followed by a pair of {}, a space and a \, and finally a semicolon
need to be reminded: Use this RM-RF must be extra careful, Linux has no Recycle Bin
Of course, RM has more other parameters and usage, the input man RM can view the
Tip: Be careful with RM commands. Because once the file is deleted, it cannot be restored. Prevents this from happening, you can use the I option to confirm the files that you want to delete individually. If the user enters Y, the file is deleted. If you enter anything else, the file is not deleted.