1, Introduction--From the wiki interpretation/dev/null:In a Unix-like system, a/dev/null, or empty device, is a special device file that discards everything written to it (but reports a successful write operation) and reads it immediately to get an
For details about the/dev/null and/dev/zero files, and solutions for accidental deletion of/dev/null and/dev/zero, and the disk I/O Testing Method Using/dev/zero, disk deletion and recovery by mistake1. Introduction-explanation from
This article was reprinted from: 11595985By default, there are always three files open, standard input (keyboard input), standard output (output to screen), standard error (also output to screen), and their respective file descriptors are 0,1,2. So
By default, there are always three files open, standard input (keyboard input), standard output (output to screen), standard error (also output to screen), and their respective file descriptors are 0,1,2. So let's take a look at the differences
By default, there are always three files open, standard input (keyboard input), standard output (output to screen), standard error (also output to screen), and their respective file descriptors are 0,1,2. So let's take a look at the differences
Detailed description of/dev/null and/dev/zero files, solutions for accidental deletion of/dev/null and/dev/zero, and disk I/O testing using/dev/zero1. Introduction-explanation from Wikipedia/dev/null:
In Unix-like systems,/dev/null, or an empty
This article goes from http://www.kissyu.org/backgroundWe can often find such statements in a shell script >/dev/null 2>&1 . Before I did not go into the role of this command, copy replicable, until last week I wrote this order accidentally 2>&1
The shell can often be seen: >/dev/null 2>&1The result of the command can be defined in the form of a%> output/dev/null represents an empty device fileWhere does the > delegate redirect to, for example: echo "123" >/home/123.txt1 means stdout
Transfer from http://blog.chinaunix.net/uid-25100840-id-3271224.html a few days ago interview has such a question, more strange: Explain the meaning of >/dev/null 2>&1: I was scratching, also did not think out, wrote a clear buffer, hehe online
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.