Find command for directories under /home


#1

I’m trying to use “find” as part of a cron job and running into a problem. It seems that commands like:
$ find /home/
or
$ find /home//
Return:
find: /home: Permission denied

Has anyone found a workaround for this?


#2

I think you can use on your cron a shell script I have done some like
#!/bin/bash

get sure we’re on our own home

cd

commands

find ./ -name “what we are searching”

end and send 0 if no error

exit 0

Also remember that find /home/ or /home wouldn’t work as home itself is not world readable you need find /home/user/


Somewhere, something incredible is waiting to be known.
Sagan


#3

Yep. Changing to the homedir and using find ./ is exactly the change I made. Thanks for the reply :slight_smile: