In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces what is the meaning of 1 less than / dev/null 2 greater than & 1 in shell. It is very detailed and has a certain reference value. Interested friends must read it!
You may often see it in shell: > / dev/null 2 > & 1
The result of the command can be defined in the form of% >
/ dev/null stands for empty device file
> indicates where to redirect, for example: echo "123" > / home/123.txt
1 represents stdout standard output, and the system default value is 1, so "> / dev/null" equals "1 > / dev/null"
2 indicates stderr standard error
& indicates the equivalent meaning, 2 > & 1, indicating that the output redirection of 2 is equivalent to 1
Then the sentence in the title of this article:
1 > / dev/null first means that standard output is redirected to an empty device file, that is, no information is output to the terminal, to put it bluntly, no information is displayed.
2 > & 1 then, the standard error output redirection is equivalent to the standard output, because the standard output has been redirected to the empty device file, so the standard error output is also redirected to the empty device file.
The above is all the content of the article "what is the meaning of 1 less than / dev/null 2 greater than & 1 in shell". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.