Smart using the RM command

xiaoxiao2021-03-06  42

We know that in the Linux character interface, you can use the RM command if you want to delete a file, and remove a directory to use the RMDIR command. However, because the rmdir command can only delete a blank directory, if there is a file below a directory, you can only use the RM command to delete the file in the directory, so it usually requires RMDIR and RM two commands to cooperate with us. Remove a complete directory completely. But use this method to deal with a few subdirectory, if a directory contains several subdirectories, and this several subdirectory contains several grade catalogs, and then use this method, don't exhale you. . Now we can use the RM command with the -R parameter to delete a non-empty directory, for example, enter a command such as RM -R BBB in the command line, indicating that the system will remove all the files contained in the BBB directory and the subdirectory.

转载请注明原文地址:https://www.9cbs.com/read-59244.html

New Post(0)