In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you the content of an example analysis of nested folders created under centos. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
How many folders can be created nested under centos?
This is an assignment that the teacher left us to think about, so we kept mkdir,mkdir, and finally found that it could not be done by hand. So a script file is written to execute automatically, and the code is as follows:
1 #! / bin/bash / / defines that bshell executes 2 iComple1 / / initializes a variable to record how many files are created, which, by the way, is used as the file name, and finally I represents the number of nesting 3 while true / / continue to create 4 do 5 mkdir $I / / create directory 6 cd $I / / into the created directory to facilitate the creation directory 7 I = `expr $I + 1`; / / I add 1 operation 8 echo $I > ~ / test/num / / output the result to the folder under the running directory 9 done
I used CentOS6.5 to do the experiment, and the final result was 1107.
Use the du command to query the size of folder 1, 4428, or 4 bytes per directory. It's the same size as just creating an empty folder.
Thank you for reading! This is the end of this article on "sample Analysis of nesting folders under centos". 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.