I would like to append new files to an existing directory in terminal. So I'm using :
cp -r pathtodirectory/directory/ directory
but I do not want to overwrite, I just want to update. Any ideas?
I would like to append new files to an existing directory in terminal. So I'm using :
cp -r pathtodirectory/directory/ directory
but I do not want to overwrite, I just want to update. Any ideas?
find pathtodirectory/directory -maxdepth 1 -type f -exec sh -c \
'for f; do ff="directory/$(basename $f)"; if [[ ! -f "$ff" ]]; then echo "Copying $f" && cp "$f" "$ff"; fi; done' sh {} +
LIMITATIONS: