Rsync allows you to exclude files and directories of your choice by adding the flag to your rsync command. This is a very generic example of using rsync to copy the contents of the to while excluding and subdirectories of the logs directory. This happens on the local machine but you can use the same multiple exclude flags.
Table of contents
Exclude directory from rsyncExclude multiple directories from rsyncExclude files from rsyncExclude files or directories based on naming patternsExclude files of specific typesExclude multiple files and directories from a listMore on rsyncSort: