generator, pipeline, find duplicate file in a given directory
output and process a pathname at a time, work like a pipeline
The original code is from Python for UNIX and Linux System Administration, 《Unix和Linux系统管理指南》.
The generator edition is inspired by http://dabeaz.com/generators/Generators.pdf