find: -fprint /dev/stdout truncates a redirected stdout
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 62/100
Research direction
Start by reading the handling of -fprint, -fprint0, -fprintf and -fls and how those actions open their output paths. Reproduce the reported case with redirected stdout, then check the corresponding stderr case. Done means /dev/stdout and /dev/stderr write to the redirected streams without truncating existing output.
Written by the indexing model from the issue text.
Description
GNU find treats /dev/stdout and /dev/stderr specially in -fprint, -fprint0, -fprintf and -fls. We open them as normal files, so when stdout is redirected the file gets truncated and the output overwrites itself.
$ echo keep > log
$ /usr/bin/find a.txt -fprint /dev/stdout >> log; cat log
keep
a.txt
$ find a.txt -fprint /dev/stdout >> log; cat log
a.txt
Same with -fprint /dev/stderr 2> err, where an error message overwrites the printed names.
- Dominant language
- Rust
- Stars
- 653
- Forks
- 115
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/findutils
-
find: -printf %h drops a doubled slashPossibly taken @qodelicious claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
find: -printf %TT and %TX drop the fraction of a secondPossibly taken @qodelicious claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
uutils/findutils#692 · 1 comment ·
Maintainers usually reply within 1 day
All issues in uutils/findutils
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
higress-group/HiRoute#405 ·
Maintainers usually reply within 1 day
-
rust_analyzer flycheck: no CLI way to enable clippy from `check.overrideCommand`Possibly taken @TrapsterDK claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bazelbuild/rules_rust#4392 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
🐞 bug 🧩 bevy_gantz_egui
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nannou-org/gantz#500 ·
Maintainers usually reply within 1 day