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
Post a Comment