Copy not wanting to overwrite
however, it doesn't seem to force it, it still asks if I want to overwrite it, therefore the script isn't working properly since it isn't overwriting the files.
Is there a way I can fix this?
Thanks
3 Replies
$ alias
If so, remove it:
$ unalias cp
Or run the command directory from the /bin folder:
$ /bin/cp -Rf directory /new/directory
@bat:
cp -Rf directory /new/directory
Not sure if it is related to your problem, but that command will give different results depending on whether /new/directory does not exist, exists as a file, or exists as a directory. You might want to take a peek at the -t option for cp. Or even better take a look at using rsync, which IMO handles local directory copying much better than cp.