This is also a document comparison command, and mastering will save you a lot of work. Do you remember the comm order? Diff is more complex than he is, easy to use, not only to compare files, but also to compare directories. When a file has multiple
2015-01-21 21:25:52Here first the programmer of the Big God's blog address (PS: Great god, I am not to copy oh, really afraid of their own forgotten), http://www.ccvita.com/445.html, there are many articles, I was handy search to browse the next,
SVN diff Replacement toolhttp://blog.csdn.net/fudesign2008/article/details/8168811One. Replace SVN diff with Vimdiff:For most Linux developers, Vimdiff's display of file differences is obviously much more intuitive than SVN diff.So can we use
SVN diff Replacement tool
One. Replace SVN diff with Vimdiff:
For most Linux developers, Vimdiff's presentation of file differences is obviously much more intuitive than SVN diff.
So can we use Vimdiff instead of SVN diff? Fortunately, SVN
Using Git in Windows, msysgit is the first choice, but the shell of msysgit is not powerful, the size cannot be changed, and the font is ugly. Therefore, in Windows, using Git in Cygwin is a good choice.
Before submitting the code, or merging the
Shell commands: delete the last column, delete the first line, diff, and so on. delete the first line of the file: sed & amp; #39; 1d & amp; #39; filename: awk & amp; #39; {print $ NF} & amp; #39; two methods for comparing filename files: 1) comm-3 -
1:grep// Display Lines# grep ' main '/home/myhome/a.c//displays the A.C containing the main line# grep-v ' main '/HOME/MYHOME/A.C//display all rows except main# grep-n ' The ' a.c//show A.C contains the line# grep-vn ' The ' a.c//shows no Line# grep-
Linux compares the differences of 2 files with two commands:
(1)diff (2)Vimdiff
cp/etc/grub.conf Hello
Add Zhangsan at the end of the hello file
Use diff to compare the differences between 2 files:
[Root@rhel ~]# diff hello/etc/grub.conf
18d17
Diff diir_1.0/dir_2.0/-urnb > dir_2.0.patchU:union output file differential information in a merged formatR: Recursive comparison of all files in subdirectoriesU: Treats non-existent files as empty filesB: Ignore the differences caused by empty rows~
201720170705425content of the result of diffcomparison. txt, 20170705 diff
201720170705425content of the result of diffcomparison. txt-- // Sometimes compare the output results of two commands. The stupid method is as follows, for example:$ Lsnrctl
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.