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--
This article is about how Linux deletes files in the directory. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Delete files in the current directory
1.rm-f *
# the classic method is to delete all types of files in the current directory
2.find. -type f-delete or find. -type f-exec rm-f {}\
# find a normal file and delete it with the find command and delete it with the processing action of the find command or
3.find. -type f | xargs rm-f
# too long parameter list; too many files to delete
4.rm-f `find. -type f`
# Delete all ordinary files
5.for delete in `ls-l`; do rm-f *; done
# use for loop statement to delete all types of files in the current directory
Delete files in the specified directory
1.rm-f specifies the directory *
# the most classic way to delete all types of files in the specified directory
2.find specified directory-type f-delete or find specified directory-type f-exec rm-f {}\
# use the find command to find all ordinary files in the specified directory and delete the or. Delete them with the processing action of the find command
3.find specifies the directory-type f | xargs rm-f
# too long parameter list; too many files to delete
4.rm-f `find specify directory-type f`
# Delete all ordinary files in the specified directory
5.for delete in `ls-l specifies the directory path`; do rm-f *; done
# use for loop statement to delete all types of files in the specified directory
Linux commands to delete folders and files
-r is recursive downward, no matter how many directories there are, delete-f directly and forcibly delete it. Delete folder instance without prompting: rm-rf / var/log/httpd/access will delete / var/log/httpd/access directory and all files and folders under it delete file use example: rm-f / var/log/httpd/access.log will force delete / var/log/httpd/access.log this file thank you for reading! This is the end of this article on "how to delete files under the directory in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
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.