Hi all i am copying files from one folder to another folder while copying i am using the following command.
cp –pvr oldfolder/ /var/www/vhosts/newsite/httpdocs/app/webroot/newfolder/ so the permission and the owner and groups are retained now i want to change (recursively) the owner and group of the newfolder/ to a new owner and group for example if it has like this... /var/www/vhosts/newsite/httpdocs/app/webroot/newfolder/ myflles/ 777 (rights) wonder (owner) psgrp (group) ro/ 755 apache apache de/ 777 wonder apache one.jpg 777 wonder psgrp two.jpg 755 apache apache after using the chown (newwonder) and chgrp (newpsgrp) , i wanted to as below. /var/www/vhosts/newsite/httpdocs/app/webroot/newfolder/ myflles/ 777 (rights) newwonder (owner) newpsgrp (group) ro/ 755 apache apache de/ 777 newwonder apache one.jpg 777 newwonder newpsgrp two.jpg 755 apache apache so hope you understand.. like i want to change the owner and group of the newly copied folder (newfolder) if and only if the owner was wonder and group was psgrp. (in other words not to change the owner and group if it was .. apache ) Thanks -- ~ J Suresh Kumar 95000 90432 http://myrakshana.info/blog/ _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc