3 ms·
What does rsync'ing "the directory itself" (in contrast to the directory content) even do? A mkdir? Does it even need to use the network connection?
by Buttons840 6y ago
What does rsync'ing "the directory itself" (in contrast to the directory content) even do? A mkdir? Does it even need to use the network connection?
- 411111111111111 6y agoRsync only works on directories in recursive mode which also copies the contents
- mhalle 6y ago"Rsyncing the directory itself" means making a copy of the directory node (the root of the tree) and naming it with the original name in the new location. That is different than taking the children of the source directory and copying them into the new location. Scp and cp have the same semantics, so cp is vulberable to this gotcha as well. Rsync doesn't have to be used with remote sources or targets (nor does scp).
- Izkata 6y ago> so cp is vulberable to this gotcha as well This is in fact why use rsync for local copies as well, it's much more consistent.