I want to create a GZIP compressed TAR archive containing the contents of /var/log, but excluding /var/log/messages file.
I tried tar -cvf var/log.tar var/log/ -x *.messages*
, but got the error message:
tar: You may not specify more than one `-Acdtrux' or `--test-label' option
Any ideas on how to go about this? I'm pretty confident I can create the archive, just not sure how to exclude the /var/log/messages file.