Im not sure what im doing wrong on this. I've read through a bunch of posts and websites but am still having issues.
I need to check a system for files that have changed in the past day but I need to skip certain mounted folders since they are mounted to drives with tons of TBs.
Here is the setup: I have few drives mounted to folders inside of /usr/local/connect/ /usr/local/connect/logs --> mounts to an NFS /usr/local/connect/DR01 --> mounts to a DR share a few more like this...
I want to run a normal find command (or any command that would work for this) that excludes those directories. Here are somethings i've tried that haven't seemed to work.
find . ! -path "/usr/local/connect/" -type f -name "*.txt" -mtime -1
find . -type f -path "/usr/local/connect/" -prune -o -name "*.txt" -mtime -1
Neither of those seem to work. I've tried to do it in different orders (like -type f first, or prune first in line, etc.) as well. But I read prune removes the proceeding path. This seems like it should be an easy thing to do. Let me know if you see my mistake! Thanks in advance!