Hi all,
I am looking to do a specific copy in Fedora.
I have two folders:
'webroot': holding ALL web files/images etc
'export': folder containing thousands of PHP, CSS, JS documents that are exported from my SVN repo.
The export directory contains many of the same files/folders that the root does, however the root contains additional ones not found in export.
I'd like to merge all of the contents of export with my webroot with the following options:
- Overwriting the file in webroot if export's version contains different code than what is inside of webroot's version (live)
- Preserve the permissions/users/groups of the file if it is overwritten (the export version replacing the live version) *NOTE I would like the webroots permissions/ownership maintained, but with export's contents
- No prompting/stopping of the copy of any kind (ie not verbose)
- Recursive copy - obviously I would like to copy all* files folders and subfolders found in export
I've done a bit of research into cp - would this do the job?:
cp -pruf ./export /path/to/webroot