In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to delete Linux directories and subdirectory files, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
In the Linux/Fedora/Ubuntu system, sometimes we want to delete files in a folder (home directory) and subdirectories (subfiles / subfolders) under this folder. Linux can not delete files using rm/rmdir alone. In fact, the method is very simple. Here we tell you how to delete the folder and all the files under the folder.
For example, we have a folder named cc
There is a subfolder cc1 and a file file1 under this main folder. Of course, there can be multiple subdirectories and files under the subfolder, so it is not listed here.
OK, here's how to delete all files in directories and subdirectories.
1. Open the terminal and log in as root (Linux/Feodra root login method: enter root at the terminal, and then enter the password, you can log in to root).
2 suppose the folder "cc" I want to delete is under "/ var". At the terminal, enter:
Rm-r / var/cc
Files such as subfiles and subfolders under the folder and its folder are deleted together.
The above is all the contents of the article "how to delete directories and subdirectory files by Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.