linux 查找重复文件_如何在Linux中查找和删除重复文件?

linux 查找重复文件

linux 查找重复文件

Hi, long time age when I was new comer to the Linux world I was using duplicate file finder named fdupes. But after a time I change my OS to windows and again to Linux. But I stopped using fdupes. Today When I was looking to the file compression of btrfs I found fdupes again and run in my test system. It it very useful tool for untidy persons on the computer. By the way I am not untidy in my computer 🙂 . Lets look to fdupes. Fdupes looks files with their  size and MD5 and then byte by byte comparison.

嗨,很长一段时间,当我刚进入Linux世界时,我使用的是名为fdupes的重复文件查找器。 但是一段时间后,我将操作系统更改为Windows,然后再次更改为Linux。 但是我停止使用fdupes。 今天,当我寻找btrfs的文件压缩时,我再次发现fdupes并在我的测试系统中运行。 对于计算机上不整洁的人来说,它是非常有用的工具。 顺便说一下,我在电脑上并不整洁🙂。 让我们来看看fdupes。 Fdupes查找文件的大小和MD5,然后逐字节比较。

安装fdupes (Install fdupes)

Ubuntu,Debian,Kali,Mint (Ubuntu, Debian, Kali, Mint)

We will install fdupes with the following command for Ubuntu, Debian, Kali, Mint.

我们将使用以下命令为Ubuntu,Debian,Kali,Mint安装fdupes

$ sudo apt install fdupes
Install fdupes
Install fdupes
安装fdupes

Fedora,CentOS,RedHat (Fedora, CentOS, RedHat)

For yum based installation for  fdupes with the following command.

对于基于yumfdupes安装, fdupes使用以下命令。

$ sudo yum install fdupes

只是看起来重复的文件 (Simply Look Duplicate Files)

Look current working directory with recursive style where all files folders and subfolders are looked.

使用递归样式查找当前工作目录,在该目录中将查找所有文件文件夹和子文件夹。

$ fdupes -r .
Simply Look Duplicate Files
Simply Look Duplicate Files
只是看起来重复的文件

We can see an duplicate example below. Files pass , Vide   and others all the same.

我们可以在下面看到一个重复的示例。 文件passVide和其他文件都相同。

Simply Look Duplicate Files
Simply Look Duplicate Files
只是看起来重复的文件

遵循符号和硬链接(Following Symbolic and Hard Links)

By default symbolic and hardlinks do not followed by  fdupes. We can enable  to follow sym and hard link with the -s and -H options. This can be useful if there are some link to other paths.

默认情况下,符号和硬链接后不包含fdupes。 我们可以使用-s-H选项启用符号和硬链接。 如果存在指向其他路径的链接,这将很有用。

$ fdupes -r  -s -H .

显示重复文件的大小信息 (Show Size Information of Duplicate Files)

Before deleting files we may want to list the size of duplicate files. We can use -S to list sizes  of the duplicate files.

删除文件之前,我们可能要列出重复文件的大小。 我们可以使用-S列出重复文件的大小。

$ fdupes -r  -S .
Show Size Information of Duplicate Files
Show Size Information of Duplicate Files
显示重复文件的大小信息

未经确认即删除(Delete Without Confirmation)

And the most useful and dangerous command where duplicate ones are deleted. Use this command in your own risk.

而最有用和最危险的命令就是删除重复的命令。 使用此命令需要您自担风险。

$ fdupes -r -d .
LEARN MORE  How To Recover Data with ddrescue Command?
了解更多信息如何使用ddrescue命令恢复数据?

如何在Linux中查找和删除重复文件? 信息图 (How To Find and Remove Duplicate Files In Linux? Infographic)

How To Find and Remove Duplicate Files In Linux? Infographic
How To Find and Remove Duplicate Files In Linux? Infographic
如何在Linux中查找和删除重复文件? 信息图

翻译自: https://www.poftut.com/find-remove-duplicate-files-linux/

linux 查找重复文件

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值