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
findas 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-printfbut write tofile[…]
(source)
Kamil Maciorowski
- 21,864
-printfbe the only thing thatfindwill be outputting or will you combine it with something like-lsand you only want the-printfto go to stderr? I mean, are you just looking forfind . -printf '%f\n' 2>/dev/null? – terdon Apr 02 '21 at 14:24