Is it possible somehow find feature -printf print out at the moment it's used into stderr ?
Asked
Active
Viewed 187 times
0
-
2Could you give us a few more details about the use case here? Will `-printf` be the only thing that `find` 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 for `find . -printf '%f\n' 2>/dev/null`? – terdon Apr 02 '21 at 14:24
1 Answers
3
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
- 19,242
- 1
- 50
- 94