Vim advanced techniques & mdash; use vim to compare two files use: 1: open two files directly with a vim-dfile1file2 contrast or: open the first file with vimfile1, use vertdiffsplitfile2 to open the second file for comparison. (vert... vim advanced skills-use vim to compare two files: 1: use vim-d file1 file2 to directly open two files or: use vim file1 to open the first file, use vert diffsplit file2 to open the second file for comparison. (vert indicates the vertical split window, which is the horizontal split window by default.) 2: directly compare the differences between the two files: use diffthis to input in two windows respectively. 3: Other tips: 3.1: Locate the difference: [c,] c jump to the previous and next differences respectively. 3.2: Window jump: ctrl-w jump to the next window ctrl-w h/l jump to the left (right) window ctrl-w j /K jump to the top (bottom) window 3.3: document merging: dp combines the current document content of the difference to another document (diff put) do copies the content of another document from the difference point to the current document. 3.4: open the file and fold it. (partial text is collapsed by default to expand the field of view) zc re-folding of the same content that zo temporarily expands # end sometimes occupies too much disk space. you need to find out which directories are the culprit and sometimes become lazy and do not want to check which logs are too large, in this case, you can use the following statement to view: du. /*-s -- time |-s option of sort-g du, which only provides a total statistics for each parameter. the -- time option lists the last modification time of the parameter file. Output them to the sort command, and use the-g option to sort the sort by number, rather than the dictionary order. In this way, the bottom file is the largest file, which can be easily checked. Or # the entire filesystem, starting at '/'Du-a/* | sort-n-r | head-n 10 # or for a particle directory: du-a/home/username/| sort-n-r | head-n 10
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service