
On 2023-03-04 21:48, J Leslie Turriff wrote:
On 2023-03-04 03:30:12 Carlos E. R. wrote:
On 2023-03-04 10:00, Bernhard Voelker wrote:
On 2/28/23 19:40, Carlos E. R. wrote: [snip] no, find(1) does not have an option to suppress this.
The others already suggested 2>/dev/null. Obviously, this also swallows other error diagnostics.
Obviously. Any important error is also swallowed in the thousands permission denied.
grep -v 'permission denied' [snip]
Of course, I should have remembered. But wait, a pipe (|) might not work, because it goes on the standard error output. So it would be: find -L . -name "*.png" -newermt 2023-01-01 2>&1 | grep -v 'Permission denied' This gets a lot of: /.cache/thumbnails/normal/47ba6e76124f62d4035dfed3d7f541f8.png ./.cache/thumbnails/normal/b20a108af8a28eeb0bb5f03bbac84353.png ./.cache/thumbnails/normal/91f916ae750a5dca8f2020fb68648166.png ./.cache/thumbnails/normal/028af4e97867a90eb4551b5be73a1e30.png ./.cache/thumbnails/normal/bd6057d9fa3d308ad94a610aa1f185c3.png ./.dosemu/drives/d/tmp/tclipboard.png ./.dosemu/drives/d/tmp/Screenshot_2023-01-06_22-25-19.png ./.dosemu/drives/d/tmp/Screenshot_2023-01-06_22-26-18.png ./.dosemu/drives/d/tmp/Screenshot_2023-01-06_22-32-54.png ./.dosemu/drives/d/tmp/Screenshot_2023-01-06_22-34-12.png So maybe this: cer@Telcontar:~> find . -path ./.dosemu -path /.cache -prune -o -name "*.png" -newermt 2023-01-01 2>&1 | grep -v 'Permission denied' No, I see lots of: ./.cache/thumbnails/normal/c7dba33a30402263a4b13b42e37dcdd3.png ./.cache/thumbnails/normal/ad349eb75f1544c110bef048d1863dee.png ./.cache/thumbnails/normal/942fb32737e09f77a35fcbf77a6195cd.png cer@Telcontar:~> find . -path ./.dosemu -prune -path ./.cache -prune -o -name "*.png" -newermt 2023-01-01 2>&1 | grep -v 'Permission denied' Nah, same problem. Only one -prune is working. Maybe: cer@Telcontar:~> find . -type d -not -readable -prune -path ./.dosemu -prune -path ./.cache -prune -o -name "*.png" -newermt 2023-01-01 No: ./.cache/thumbnails/normal/91f916ae750a5dca8f2020fb68648166.png ./.cache/thumbnails/normal/028af4e97867a90eb4551b5be73a1e30.png ./.cache/thumbnails/normal/bd6057d9fa3d308ad94a610aa1f185c3.png ^C One needs a training course on find to use find. I hate this. And when I need it in a year time, I will have forgotten. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)