Is it possible somehow find feature -printf
print out at the moment it's used into stderr ?
Asked
Active
Viewed 284 times
1
1 Answers
4
Assumptions:
- GNU
find
; - you don't want to redirect the stdout of
find
as a whole.
Then don't think -printf
can be redirected. But there is -fprintf
. Use it with /dev/stderr
or equivalent path.
Action:
-fprintf file format
True; like-printf
but write tofile
[…]
(source)

Kamil Maciorowski
- 21,864
-printf
be the only thing thatfind
will be outputting or will you combine it with something like-ls
and you only want the-printf
to go to stderr? I mean, are you just looking forfind . -printf '%f\n' 2>/dev/null
? – terdon Apr 02 '21 at 14:24