coldcoffee 发表于 2005-6-6 12:20:09

找出某个目录及子目录下同名的文件,前是我不知道重名的文件名。

找出某个目录及子目录下同名的文件,前是我不知道重名的文件名。

kornlee 发表于 2005-6-6 13:00:45

try:
find /path -type f -exec basename {} \;|sort|uniq -D|while read file;do find $(pwd) -name $file;done|sort|uniq -d

dannycat 发表于 2005-6-6 13:40:29

find /path -type f -exec basename {} \;|sort|uniq -D|while read file;do find $(pwd) -name $file;done|sort|uniq -d
这样好像不行吧?

改一下: find /path/ -type f -exec basename {} \; | sort | uniq -d | while read file; do echo -e "\n$file:" && find /path/ -type f -name $file; done
页: [1]
查看完整版本: 找出某个目录及子目录下同名的文件,前是我不知道重名的文件名。