Skip to main content


Things I always have to look up:

When to put or avoid slashes at the end of a paths when calling rsync.

Image/Photo

hackbyte reshared this.

yeah .. me 2 .. *sigh*

At least it's consistent. With cp -r, it puts contents of A into a new B if B does not exist, OR if B already exists, puts a new A with its content INTO B.

rsync is actually easy and consistent. slash or not on right side, does not matter. trailing slash on left side means "content, not named thing itself, goes to right side dir", and without slash on left side, it's going below. All regardless of right side dir existing or not, it will exist afterwards (one level).

I no longer use "cp" for anything except single file copies.

indeed, when i need to copy a bunch of files or even a directory hierarchy, i prefer to use "plain" rsync in the first place..