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 > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "what is the use of Linux's tempfile command". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Linux common commands tempfile commands are mainly used to name temporary files in shell.
Name temporary files in tempfileshell
Add that sometimes you need to temporarily store data when writing Shell scripts, and the most suitable place to store temporary file data is / tmp, because all the contents in this directory will be emptied after the system is rebooted. Here are two ways to generate standard file names for temporary data.
The tempfile command tempfile command comes with it by default only in Debian-based distributions, such as Ubuntu, which is not available in other distributions.
Use the tempfile command to name a temporary file:
Temp_file_name=$ (tempfile) uses a file name with a random number as a temporary file name:
Temp_file_name= "/ tmp/file_$RANDOM" $RANDOM is an environment variable that returns a random number.
The $variable can also use its own temporary file name if it does not have a Linux distribution of the tempfile command:
Temp_file_name= "/ tmp/file.$" $$is a system predefined variable that displays the process number of the current process. The suffix added with. $will be extended to the currently running script process id.
This is the end of the content of "what is the use of Linux's tempfile command". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.