更多精品http://shop65927331.taobao.com
分类: LINUX
2010-02-12 11:26:58
Type the following command under Debian / Ubuntu Linux:
Type the following command under Redhat / RHEL / Fedota / CentOS Linux, enter (turn on before running the following ):# yum install fdupes
Find duplicate files in /etc/ directory, enter:# fdupes /etc
Sample outputs:
/etc/vimrc /etc/virc
You can force fdupes to prompt you for files to preserve, deleting all others (use this with care otherwise you may loss data): # fdupes -d /etc
Sample outputs:
[1] /etc/vimrc [2] /etc/virc Set 1 of 1, preserve files [1 - 2, all]: 1 [+] /etc/vimrc [-] /etc/virc
You can recursively search every directory given follow subdirectories encountered within the -r option, enter:# fdupes -r /dir1
Type the command as follows:# fdupes /dir1 /dir2
OR# fdupes -r /etc /data/etc /nas95/etc
Type the following command with the -S option:# fdupes -S /etc
Sample outputs:
1533 bytes each: /etc/vimrc /etc/virc
原文出处:
转载有理,分享无罪