Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Linux uses Meld to compare folders

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to use the Meld comparison folder for Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Compare folders with Meld

Open the Meld tool and select the compare folders Directory comparison option to compare the two folders.

Compare directories using Meld

Select the folder you want to compare:

Select the directories

Then click the compare Compare button, and you will see that Meld is divided into two columns to compare directories as shown in the figure, just like file comparison.

Compare directories visually

The columns display these folders in a tree. You can see in the image above-- the difference, whether it's a new file or a modified file-- is highlighted in different colors.

As you can see from Meld's official documentation, each different file or folder you see in the window is highlighted. This makes it easy to see the difference between this file / folder and the corresponding file / folder in another column.

The following table shows the meaning of the different font sizes / colors / backgrounds highlighted when comparing folders listed on the Meld website.

All files / folders in folders with the same meaning of state representation and normal font comparison are the same. The files in the same italic folder are different after filtering, but if you use a text filter, the files are the same. These files are different in folders where you have modified the blue bold comparison. Create a new green bold this file / folder exists in this directory, but not in other directories. Missing gray text, delete line the file / folder does not exist in this directory, it exists in some other directory. Error an error occurs when comparing files in red and bold with a yellow background, the most common causes of which are file permissions (for example, Meld cannot open the file) and file name encoding errors. By default, Meld lists all the contents in the comparison folder, even if they are no different. Of course, you can also click the same Same button in the toolbar to set Meld not to display these same files / folders-click this button to make it unavailable.

Same button

Meld compare buttons

Here is a screenshot of clicking the same Same button to make it unavailable:

Directory Comparison without same files

This way you will see that only different files (new and modified) are displayed in the two folders. Similarly, if you click the New New button to make it unavailable, Meld will only list the modified files. Therefore, you can use these buttons to customize what you want to display when comparing folders.

You can use the up and down arrows in the display area of the tool window to toggle the choice of whether to display new or modified files. To open two files for column comparison, double-click the file, or click the compare Compare button next to the arrow.

Meld compare arrow keys

Tip 1: if you look closely, you will see some small bars on the left and right side of the Meld window. The purpose of these bars is to provide "simple color-based comparison results". For each different file / folder, there is a small color block on the bar. You can click each of these small blocks to jump to its corresponding file / folder.

Tip 2: you can always compare files in columns and merge different files your way. If you want to merge all different files / folders (that is, you want one specific file / folder to be exactly the same as another), you can use the copy to the left Copy Left button and copy to the right Copy Right button:

Meld copy right part

For example, you can select a file or folder in the left column and click the copy to right Copy Right button to make the corresponding entry on the right exactly the same.

Now, find the filter Filters button in the window's drop-down menu, which is under the same Same, new New, and modified Modified buttons. Here you can select or cancel the file type and tell Meld whether to display this type of file / folder when comparing folders. The official document explains that this entry in the menu indicates that "this type of file name will not be viewed when performing a folder comparison."

Entries in the list include backup files, operating system metadata, version control files, binaries, and multimedia files.

Meld filters

The above-mentioned entries can also be found in this way: browse-> file filtering. You can add new elements to this entry by editing-> preferences-> file filtering (or you can delete existing elements).

Meld preferences

To create a new filter condition, you need to use a set of shell symbols. The following table lists the shell symbols supported by Meld:

Wildcards match * any characters (for example, zero or more characters)? One of the most important points in one of the characters listed in [abc] that [! abc] is not in any of the {cat,dog} "cat" or "dog" characters is that the file name of Meld is case-sensitive by default. In other words, Meld believes that readme and ReadMe are different files from README.

Fortunately, you can turn off case sensitivity of Meld. Just open the browse menu and select the ignore file name case Ignore Filename Case option.

Meld ignore filename case

This is the end of the article on "how to use the Meld comparison folder for Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report