I can use -s
in grep
to suppress errors, but I don't see an equivalent for the find
command in the man page... Is the only option to redirect STDERR>/dev/null?
Or is there an option that handles this? (open to fancy awk
and perl
solutions if needed)
Example:
$ for dir in `ls /mnt/16_c/`; do find /mnt/16_c/$dir/data/ -mtime +180 -type f -exec echo {} \;; done
find: `/mnt/16_c/test_container/dat/': No such file or directory