In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
The editor today takes you to understand how the Linux system outputs the command results to a file. The knowledge points in the article are introduced in great detail. Friends who think it is helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's follow the editor to learn more about "Linux system how to output command results to a file".
1. Overwrite write: echo Log contents > file
two。 Append write: echo "log contents" > > file
Meaning of "2 > & 1" in 3.linux shell:
For & 1, more accurately, it should be the file descriptor 1, while 1 identifies the standard output, stdout.
For 2, it means standard error, stderr. 2 > & 1 means to redirect standard error to standard output.
Index.php task testOne > / dev/null 2 > & 1 (ignore all output)
Thank you for your reading, the above is "Linux system how to output command results to the file," the whole content, learn friends hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!
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.