Find command

Hi all,

I have installed and configured under / partitions only.

I want to search some files under / (root) partitions (** No need to search /tmp, /usr, /var ) using find command.

Any one help me how to do that.

Regards,
Thakshina

You need to be a bit more explicit.

Do you have separate filesystems for /tmp, /usr, /var etc. by any chance? If you do, then many versions of the find command (it varies by the OS you are using) have either an -xdev or a -mount flag you can set so that it only searches within the filesystem you specify.

Depending how long it takes, one very crude way to do this would be:-

find / -name "*whatever*" |egrep -v "^\/var|^\/tmp|^\/usr"

....but that might takes ages and is not recommended. It will basically search overything and then as a second step, ignore output that starts with /var, /tmp & /usr

Please post a more detailed description of what you are trying to acheive.

Robin
Liverpool/Blackburn
UK