Using the copy command "cp
" the option -R simply asks for a recursive copy of folder and sub-folders.
Consider using the --archive
or -a option. According to my man page, --archive
--no-dereference ..... never follow symbolic links in the SOURCE path
--preserve=all ....... attributes might be: mode,ownership,timestamps,context,links,xattr,
If you follow a sym-link, the files or folders being pointed at get copied. Otherwise, the sym-link itself gets copied as a lone file.
Another way to do this involves using tar
into a pipe instead of a file.
The pipe then uses tar again to read the pipe. tar
is somewhat smarter than
when it comes to duplicating complex trees of files and folders.