finding files using prune option

Hi All,

I am trying to find files in a directory and don't want to search in the sub directories and using the command
find . \( ! -name . -prune \) -mtime +1 -name '.log'
and is working fine.
But when I am trying with absolute path then is not working like
find /home/subodh \( ! -name /home/subodh -prune \) -mtime +1 -name '
.log'

Can anybody help me with this.

Thanks in advance.

When you do it right, it works. When you do it wrong, it fails. You want a feature that does not exist. /home/subodh is a path, not a name. A few versions of find have -path. If yours does not, you are out of luck.