cpx Introduced as a Faster, Modern Replacement for Linux cp
cpx Introduced as a Faster, Modern Replacement for Linux cp
It’s a damn pain to remember all the flags. How many flags can a program friggin have? I’m always afraid that some flag I enter will reverse the sync and delete everything in the source folder because the target is empty.
I use rsync only when all params have been reseasrched and tested. cpx presumably just requires cpx - r source target instead of 5 rsync flags.
I just looked it up and - x means one filesystem. But does - v give you a progress bar or just a lost of stuff copied?
IIRC rsync also treats the trailing slash in a special manner that I always have to look up.
The trailing slash is just following cp’s own special treatment
# before dir/ file1 target/ orig.txt # no trailing slash - copy *dir* to target cp -r /path/to/some/dir /my/target # after target/ orig.txt dir/ # dir copied to target file1 # with trailing slash - copy *contents* of dir to target cp -r /path/to/some/dir/ /my/target # after target/ orig.txt file1 # contents of dir