Im using a Mac, trying to create a tarfile which exludes all hidden files (e.g. .file) I've tried the following, but each time it includes hidden files:
tar --exclude='.*' -czvf test.tgz .
tar --exclude='.[^/]*' -czvf test.tgz .
Can anyone tell me the correct syntax which will help me resolve this?
Many thanks