uutils / findutils

Rust implementation of findutils
MIT License
300 stars 37 forks source link

Specifying the same file for output multiple times in `find` will overwrite the file by default. #439

Open hanbings opened 1 month ago

hanbings commented 1 month ago

refer: https://github.com/uutils/findutils/pull/421#discussion_r1705640231

For future reference: GNU find de-duplicates files, so if you do find -fprint foo -fprint foo it will use the same FILE * for both and you'll get each line twice. Right now uutils will use two different Files and the writes will overlap with each other.