0

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

KamilCuk
  • 120,984
  • 8
  • 59
  • 111
R111
  • 151
  • 1
  • 6
  • 14

0 Answers0