找出某个目录及子目录下同名的文件,前是我不知道重名的文件名。
找出某个目录及子目录下同名的文件,前是我不知道重名的文件名。 try: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 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]