uutils / findutils

Rust implementation of findutils
MIT License
314 stars 38 forks source link

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

Open hanbings opened 3 months ago

hanbings commented 3 months 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.