Direct RM is available, but add two parameters-rf that is: RM-RF directory name
-R is recursive down, no matter how many levels of directory, deleted;
-F is directly forcibly deleted, without any hint of meaning.
For example: Delete a folder instance:
Rm-rf/var/log/httpd/access
The/var/log/httpd/access directory and all files and folders under it will be deleted
(there may be a problem here, if you use it directly, the system may not authorize this operation, and come out permisSion denied (no permission) prompt.
You need to add sudo as a license to authorize the operation before RM-RF, i.e. the name of the sudo rm-rf folder)
Example: Delete a file instance:
Rm-f/var/log/httpd/access.log
This file will be forcibly deleted/var/log/httpd/access.log
To be reminded: Use this rm-rf with extreme caution, Linux does not have a recycle Bin.
Of course, RM has more parameters and usage, and the man RM can be viewed.
There is also a way to be useful:
mkdir a Create directory A
RmDir a Delete directory a Note: rmdir can only delete empty directory, if there are files in the directory, then delete failed
How do I delete a folder under Linux?