Before talking about these two brothers, we should first conduct an experiment:
Create a new test.txt file in win7and use NotePad to open the following content and save it.
Use ultraedit to enable it in hexadecimal format, as shown in figure
Check the content first, and open vimin Debian. input the content of the same sample and save it as the test.txt file.
Then input the following command in VIM:
: %! Xxd
View the file in hexadecimal format, as shown in:
Okay, I have two files in hexadecimal format on the front.CodePost below for comparison:
Win7: 53 6f 62 65 31 0d 0a 73 6f 62 65 32
Debian: 53 6f 62 65 31 0a 73 6f 62 65 32 0a
Now you can see it clearly. 0x0d indicates that the carriage return is '\ R', and 0x0a indicates that the line feed is' \ n'
From the above results, we can draw the following conclusions:
1. In Win, a [enter key] means entering a combination like \ r \ n. in Linux, it means inputting '\ n ';
2. In these two systems, the same file content is not necessarily in the same size;
3. in Linux, line breaks are added at the end of each line, while in win, "\ r \ n" is inserted only when the Enter key is entered ";
4. After deleting all the file content in Vim, do you think the file is empty? The experiment proves that it is not empty.
Do you understand ??? Thank you for choosing ~~~
Reference a usefulArticleHttp://www.jb51.net/article/26547.htm
Source: cnblogs sobe