How to Recursively Copy a Folder Excluding Certain File Types in Unix

Use rsync

rsync -aP --exclude=*.mp4 /folder1/* /folder2/

  1. -a : Recursive
  2. -P: Shows progress
  3. --exclude: You cause use file types or directory here. For multiple file types, you can use multiple exclude commands. For example --exclude=*.jpg --exclude=*.png

Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *