-   Solaris / OpenSolaris (
-   -   help req in chown command (

vishnu 07-21-2006 06:36 AM

help req in chown command
hi friends
I want t change the ownership of all files owned by a user harry on a folder /access to another user abhijeet. But the folder contains files owned by many other users also which I dont want to disturb..
Can any one help me with the chown command..

Now I am changing the ownership of files one by one using the command "chown abhijeet /access/stage12*

VishnuPrasad Chaurasia

spirit receiver 07-21-2006 07:05 AM

The find command should do the trick. Note that it will also examine subdirectories of /access, use find's -maxdepth switch to prevent this.

find /access -type f -user harry -exec chown abhijeet '{}' \;

All times are GMT -5. The time now is 09:48 PM.