Search This Blog

Showing posts with label Rsync. Show all posts
Showing posts with label Rsync. Show all posts

Tuesday, November 26, 2019

How to copy file/folder excluding certain files in MaC/Linux



CP command does not provide option to exclude files.

As an alternate option, we can user rsync which also faster than cp.

for example : To exclude hidden files following can be used.



rsync -r sourcePath targetPath --exclude='.*


Similarly other option can also be explored with  -help.

Cheers,

Kapil

Popular Posts