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
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
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
Using/dev/null
Think of/dev/null as a "black hole". It is very equivalent to a write-only file. All content written to it is lost forever. And trying to read content from it is nothing. However,/dev/null is very useful for both the command line and
In a Unix-like system,/dev/null is called an empty device, which is a special device file that discards everything written to it, but he reports that the write succeeds and reads it immediately to get an EOF. In programmer jargon, especially in Unix
Shell may often see: Echo log>/dev/null 2> & 1
Command results can be defined in the form of %>/Dev/null: Indicates an empty device file.>: Indicates the redirection location, for example, Echo "123">/home/123.txt1: Indicates stdout standard
I. Explanation of DD commandsDD: Use a block of the specified size to copy an object and perform the specified conversion at the same time. Note: If the following column ends with a specified number, multiply it by the corresponding number: B = 512;
1. Please check the information to understand these terms:/dev/hda,/dev/hdb,/DEV/SDA,/dev/sdb, what is the difference between them?A: Hda generally refers to the IDE interface of the hard disk, HDA refers to the first hard disk, HDB refers to the
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.