hi
I have 2 folders "source" and "destination".
some of the files at the "destination" are the same name as "source"
and are newer than the ones at "source".
I need to copy all files in "source" and symbolic links and sub-folders and etc. to "destination" without overwriting anything at the "destination" folder even if the files are the same name , even if the files at the "source" folder are newer than the ones at "destination"
I have to do this via a shell script with 1 or 2 commands and can't be prompt to ask if I want to overwrite or not.
another obstacle : I can't use the rsync command, system administrator doesn't give me access to do so.
this is as close as I got so far:
Code:
cp -p -r -u /source/* /dest
the only problem right now is that the "-u" flag works as so (form the man):
Quote:
"copy only when the SOURCE file is newer than the destination file or when the destination file is missing"
|
and as mentioned: I don't want to overwrite even if the files at the "source" are newer.