The following simple command yield the following result:
$ tar -zcvf clusterops.tgz ansible --exclude='.git' --exclude='.idea' --exclude='**/.ssh' --exclude='*.log' | grep ssh
ansible/.ssh/
ansible/.ssh/ClouderaManagerKey.ppk
ansible/.ssh/ClouderaManagerKey.pem
What is going on here? Why the pattern '**/.ssh' fail to do anything?
.ssh
located in any directory within the archive. Instead, use--exclude='*/.ssh/*'
– Nasir Riley Mar 25 '18 at 02:02