Skip to main content

How to identify files of the same content on Linux

Ccie exam fee How to identify files of the same content on Linux

File copies can sometimes take up a lot of disk space and can be confusing if you want to update. Here are six commands to help you identify these files. click to join new ccie group


First, use the diff command to compare files

Perhaps the easiest way to compare two files is to use the diff command. The output will show the difference between the two files.The < and > symbols indicate whether the extra line is in the first (<) or second (>) file provided as a parameter. In this example, the extra line is in backup.html.Ccie exam fee




If the diff shows no output, it means the two files are the same.

The only downside to diff is that it can only compare two files at a time, you must identify the files to be compared. Some of the commands we will see in this article can find duplicate files for you.

Second, the use of checksum

This checksum (verify) command calculates the checksum file. The checksum is to reduce the content math to a very long number (eg 2819078353 228029).Although not absolutely unique, files with different contents are less likely to result in the same checksum.


Third, use the find command
Although the find command does not have the option to find duplicate files, it can be used to search for files by name or type and run the cksum command. E.g:




Fourth, use the fslint command

The fslint command can be used to specifically find duplicate files. Please note that we give it a starting position. If you need to run a large number of files, the command may take a considerable amount of time to complete.This is the output of a very modest search.Ccie exam fee. Note how it lists duplicate files and find other issues, such as empty directories and error IDs



You may have to install fslint on your system. You may also need to add it to your search path:



Five, use the rdfind command

The rdfind command will also look for duplicate (same content) files. This name stands for "Redundant Data Lookup", which determines which files are the original files based on the file date - this is helpful if you choose to remove duplicates because it will delete the newer files.

You can also run this command in "dryrun" (that is, only report changes that might otherwise be made).


The rdfind command also provides options such as ignoring empty files (-ignoreempty) and following symlinks (-followsymlinks). Check the man page for an explanation.








Note that the rdfind command provides the option to remove duplicate files using the -deleteduplicates true setting.


You may have to install the rdfind command on your system. Trying to use it to familiarize yourself with how it works can be a good idea.

Sixth, use the fdupes command

The fdupes command also makes it easy to identify duplicate files and provides a number of useful options - like -r recursion. In its simplest form, it combines duplicate files as follows:

This is an example of using recursion. Please note that many duplicate files are important (user's .bashrc and .profile files) and obviously should not be removed.

Many of the options for the fdupe command are as follows. Use the fdupes -h command or read the man page for more details.


The fdupes command is another command that you want to install and use for a while to familiarize yourself with many of its options.Ccie exam fee. The Linux system provides a number of tools for locating and deleting duplicate files, as well as the options you want to run a search on and how to perform duplicate files when they are found.

Publisher:IE LAB
publish Website: http://ielab.network 
WhatsApp: +8617782638871
Skype:live:ielab.anna

Comments

Popular posts from this blog

Cisco ccie exam Linux overview and history

      Cisco ccie exam Linux overview and history Simply put, the Linux operating system is a clone of the UNIX operating system, which was born on October 5, 1991 (the first time it was officially announced). It's the same as Microsoft's Windows, apple's MAC OS and android on mobile phones. Cisco ccie exam.Compared to ordinary people, Linux system may be relatively unfamiliar, and most of them are probably familiar with Windows system. Since the graphical interface of Windows is simpler and easier to use, Windows occupies more markets, and Linux systems are mainly command-line operations, which are more demanding for professionalism.Cisco ccie exam Linux systems are stable, secure, and have strong concurrency, so they are widely used in the server field. The professional servers are almost all Linux systems. Linux is open source, free, everyone can see the source code of Linux, you can use Linux for free. And the Linux kernel is short and lean, and some can only be a ...

Cisco ccie exam Introduction to the OpenFlow protocol

Cisco ccie exam Introduction to the OpenFlow protocol OpenFlow, a network communication protocol, belongs to the data link layer and can control the forwarding plane of the network switch or router, thereby changing the network path of the network packet. OpenFlow protocol background: Forwarding and control separation is one of the essential features of SDN networks.In the SDN network architecture, the control plane is separated from the forwarding plane, the management and state of the network are logically grouped together, and the underlying network infrastructure is independent from the application, thereby enabling the network to achieve unprecedented programmable, controllable, and automated capabilities.Cisco ccie exam. This makes it easy for users to build highly scalable elastic networks based on business needs. To implement the transfer separation architecture of the SDN network, a communication interface standard needs to be established between the SDN controller and the dat...

CISCO CCIE EXAM 5G and WIFI6, still can't tell? (1)

cisco ccie exam 5G and WIFI6, still can't tell? (1) Ⅰ. the opening: On October 3, 2018, the Wi-Fi Alliance officially incorporated WiFi based on the 802.11ax standard into the regular army and became the sixth generation WiFi technology. The WiFi specification was renamed, the standard 802.11n was renamed to WiFi 4, the standard 802.11ac was renamed to WiFi 5, and the new standard 802.11ax was renamed to WiFi 6. (Of course, the previous generation of 802.11b/a/g can be chased as WiFi 1/2/3) Not only changed the naming convention of WiFi, but also in the network connection of WiFi devices. Also all use the new UI icon. The icon will display the level of the WiFi network you are currently connected to through the most intuitive numbers. Wi-Fi is well known to us. Wi-fi has evolved from 802.11b in 1999 and has gone through five generations. The Wi-Fi Alliance announced the simplification of the name of the new Wi-fi to Wi-fi6 when it introduced the new generation of 802.11ax stan...