Caballero
Caballero

Reputation: 12091

Batch xcopy exclude example in bash

This is one of the rows from my in windows batch file

xcopy multilang\app\*.* multilang\admin /exclude:xcopy.exclude.txt /y

I'm trying to translate it to linux bash, so far I've got this far:

rsync -av multilang/app/ multilang/admin/ --exclude=

I'm stuck with --exclude value, because it must be a list of files read from file xcopy.exclude.txt. I know it should be possible to do with piping, just not sure how?

Upvotes: 0

Views: 260

Answers (1)

Mr. Llama
Mr. Llama

Reputation: 20889

From the man pages, it looks like rsync has an --exclude-from=FILE flag you could use.

--exclude-from=FILE     read exclude patterns from FILE

Upvotes: 1

Related Questions