How to use ‘cp’ command to exclude a specific directory?

rsync is fast and easy: rsync -av –progress sourcefolder /destinationfolder –exclude thefoldertoexclude You can use –exclude multiples times. rsync -av –progress sourcefolder /destinationfolder –exclude thefoldertoexclude –exclude anotherfoldertoexclude Note that the dir thefoldertoexclude after –exclude option is relative to the sourcefolder, i.e., sourcefolder/thefoldertoexclude. Also you can add -n for dry run to see what will be … Read more