On Tue, 28 Feb 2023 19:40:32 +0100 (CET), "Carlos E. R." <robin.listas@telefonica.net> wrote:
I trying to find png files created recently in my home. So I do:
cer@Telcontar:~> find * -name "*.png" -newermt 2023-01-01 find: ‘Backups Discos/Disco Seagate Basic 2TB para backup de Legolas/Seagate Basic/Seagate’: Permission denied p.png
Can I make it not print the error?
'sudo find'
If I try:
find -L . -name "*.png" -newermt 2023-01-01
there are so many errors that I can not read the results.
'find' following symlinks (-L option) is a big mess.
- -ignore_readdir_race doesn't do it.
You are not deleting files, so -ignore_readdir_race has no use for you.
cer@Telcontar:~> find -L . -name "*.png" -path ./.dosemu/ -prune -ignore_readdir_race -newermt 2023-01-01
ind: ‘./.dosemu/drives/d/tmp/systemd-private-2d6e8e36b0594f8bbdd30cba975d2743-upower.service-y7EoBi’: Permission denied find: ‘./.dosemu/drives/d/tmp/systemd-private-2d6e8e36b0594f8bbdd30cba975d2743-rtkit-daemon.service-2odVpf’: Permission denied find: ‘./.dosemu/drives/d/tmp/BootInfo-JQ12X6Q3’: Permission denied find: ‘./.dosemu/drives/d/tmp/BootInfo-bzvrn7Gi’: Permission denied find: ‘./.dosemu/drives/d/tmp/systemd-private-2d6e8e36b0594f8bbdd30cba975d2743-power-profiles-daemon.service-UnAvYi’: Permission denied find: ‘./.dosemu/drives/d/tmp/systemd-private-2d6e8e36b0594f8bbdd30cba975d2743-geoclue.service-aQ0lfj’: Permission denied find: ‘./.dosemu/drives/d/tmp/systemd-private-2d6e8e36b0594f8bbdd30cba975d2743-ntpd.service-Mr8llh’: Permission denied ^C
The -path term will never match the slash on the end, so this will produce no result: find . -path ./.dosemu/ 2>/dev/null Try: find . -path ./.dosemu -prune -o \ -name "router_config_i_will_need_in_the_future.png" -newermt 2023-01-01 -print -- Robert Webb