how can i exclude files when creating tar archive?
tar -zcv -f target.tar.gz --exclude-from='exclude.txt' source/
Now, in your exclude.txt file you can place the paths to exclude:
logs/*
errors
data/*.bin
tar -zcv -f target.tar.gz --exclude-from='exclude.txt' source/
Now, in your exclude.txt file you can place the paths to exclude:
logs/*
errors
data/*.bin