copy over, but leave ownership the same - HOW?
so I often need to copy over entire files and sym links from one location (site root) on my server to another. I normally use:
Code:
cp -r -p /home/cpm186/public_html /home/cpm923/subdomains/example
I am doing this as root
then I still need to go in and do this:
Code:
cd /home/cpm923/subdomains;
chown -R cpm923 *;
chgrp -R cpm923 *
Any way I can copy files into another area and have the files automatically inherit owner and group attributes of the folder being dumped into? THANKS! and btw if youneed PHP help, www dot phpbuilder etc is the forum I help out on as that's my strength ;)
Sam