|
注意 rdfind 命令提供了 -deleteduplicates true 的设置选项以删除副本。希望这个命令语法上的小问题不会惹恼你。;-)
$ rdfind -deleteduplicates true ....Deleted 1 files. <==
你将可能需要在你的系统上安装 rdfind 命令。试验它以熟悉如何使用它可能是一个好主意。
使用 fdupes 命令
fdupes 命令同样使得识别重复文件变得简单。它同时提供了大量有用的选项——例如用来迭代的 -r。在这个例子中,它像这样将重复文件分组到一起:
$ fdupes ~/home/shs/UPGRADE/home/shs/mytwin-
/home/shs/lp.txt/home/shs/lp.man-
/home/shs/penguin.png/home/shs/penguin0.png/home/shs/hideme.png
这是使用迭代的一个例子,注意许多重复文件是重要的(用户的 .bashrc 和 .profile 文件)并且不应被删除。
# fdupes -r /home/home/shark/home.html/home/shark/index.html-
/home/dory/.bashrc/home/eel/.bashrc-
/home/nemo/.profile/home/dory/.profile/home/shark/.profile-
/home/nemo/tryme/home/shs/tryme-
/home/shs/arrow.png/home/shs/PNGs/arrow.png-
/home/shs/11/files_11.zip/home/shs/ERIC/file_11.zip-
/home/shs/penguin0.jpg/home/shs/PNGs/penguin.jpg/home/shs/PNGs/penguin0.jpg-
/home/shs/Sandra_rotated.png/home/shs/PNGs/Sandra_rotated.png
(编辑:成都站长网)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|