Change owner.

i want to find what are the files having owner as 'palani' my entire filesystem ( sub directories )
and needs to change the owner ( chown ) to 'raju'.

Can anyone help on this to write a shell script.

Thanks in advance.

$ find /path/to/search/ -user <userName>

or

$ find /path/to/search/ -nouser <userID>

Ripat,

Thanks a lot for your help.

I need one more help.
I want to find out the files having 777 permission and i need to change it to 755. ( Including sub directories ).

Can you/anybody help on this.

the same,
find with -perm option

then iterate through a loop and change the perms to 755