In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What are the ways to delete linux folders? In response to this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more small partners who want to solve this problem find a simpler and easier way.
Direct rm can be, but to add two parameters-rf, that is: rm -rf directory name
-r is recursion down, no matter how many levels of directories, delete them together;
-f means to delete directly without any prompt.
Example: Delete 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 a Permission denied prompt will appear.)
At this time, you need to add sudo before rm -rf as permission for authorized operations, i.e. sudo rm -rf folder name)
Example: Delete file instance:
rm -f /var/log/httpd/access.log
The file/var/log/httpd/access.log will be forcibly deleted
Need to remind is: use this rm-rf time must be extra careful, linux has no recycle bin.
Of course, rm has more parameters and usage, man rm can be viewed.
There is another way that works:
mkdir a create directory armdir a delete directory a note: rmdir can only delete empty directory, if there are files in the directory, then delete failed about linux delete folder method what questions to share here, hope the above content can have some help for everyone, if you still have a lot of doubts not solved, you can pay attention to industry information channel to learn more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.