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--
This article will explain in detail about linux with if statement to determine whether the file exists, the quality of the article content is high, so Xiaobian share for everyone to make a reference, I hope you have a certain understanding of relevant knowledge after reading this article.
We can use the Linux shell to determine whether the file exists, let's take a look at it.
1. Create a.sh file
#The-f parameter here determines whether/home/abc.log exists if [ -f "/home/abc.log" ]; then echo "File exists"else echo "File does not exist"fi
2. Grant script execution permission
chmod +x a.sh
3. Run script
./ a.sh on linux with if statement to determine whether the existence of the file method to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
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.