I am obviosuly missing something in this simple command, but have spent quite a while trying different combinations. Please advise if you can find the error I am missing.
Code:
tar cvzf squidanalyzer-6.0.tgz --exclude=./squidanalyzer-6.0/etc/log/* squidanalyzer-6.0/
The output keeps including the files under /etc/log
squidanalyzer-6.0/etc/
squidanalyzer-6.0/etc/excluded
squidanalyzer-6.0/etc/included
squidanalyzer-6.0/etc/squidanalyzer.conf
squidanalyzer-6.0/etc/network-aliases
squidanalyzer-6.0/etc/log/
squidanalyzer-6.0/etc/log/access_log
squidanalyzer-6.0/etc/log/access_log-20140914
squidanalyzer-6.0/etc/log/error_log-20140921
squidanalyzer-6.0/etc/log/error_log-20140914
squidanalyzer-6.0/etc/log/error_log-20140928
squidanalyzer-6.0/etc/log/access_log-20140907
squidanalyzer-6.0/etc/log/access_log-20140923
squidanalyzer-6.0/etc/log/error_log-20141005
squidanalyzer-6.0/etc/log/error_log
squidanalyzer-6.0/etc/user-aliases
squidanalyzer-6.0/Makefile
squidanalyzer-6.0/ChangeLog
I tried other permutations of the exclude pattern as
Code:
tar -cvzf squidanalyzer-6.0.tgz --exclude='./squidanalyzer-6.0/etc/log/*' squidanalyzer-6.0
tar -cvzf squidanalyzer-6.0.tgz --exclude='./squidanalyzer-6.0/etc/log' squidanalyzer-6.0
tar --exclude='./squidanalyzer-6.0/etc/log/*' -cvzf squidanalyzer-6.0.tgz squidanalyzer-6.0
tar -cvzf squidanalyzer-6.0.tgz squidanalyzer-6.0 --exclude=./squidanalyzer-6.0/etc/log/*
tar -cvzf squidanalyzer-6.0.tgz squidanalyzer-6.0 --exclude='./squidanalyzer-6.0/etc/log/*'
tar -cvzf squidanalyzer-6.0.tgz squidanalyzer-6.0 --exclude='./squidanalyzer-6.0/etc/log'
But nothing seems to exclude that folder. This is test run. In my ral implementation, I have thousands of log files under that dir and I really don't want to back them up.
Any guidance/suggestion is greatly appreciated. Thanks !