rsync -a /path/to/bar/ /path/to/foo/ # => /path/to/foo/[contents of bar] rsync -a /path/to/bar /path/to/foo/ # => /path/to/foo/bar/[contents of bar] cp -a /path/to/bar/ /path/to/foo/ # => /path/to/foo/bar cp -a /path/to/bar /path/to/foo/ # => /path/to/foo/bar
why can’t cp have the same source behavior as rsync?
btw, I found the solution on this blog:
mkdir target_directory cd source_directory cp -a . target_directory
(on the blog, the author does cp -ap, but that looks redundant according to the man page)
rsync vs. cp
why can’t cp have the same source behavior as rsync?
btw, I found the solution on this blog:
(on the blog, the author does cp -ap, but that looks redundant according to the man page)