Skip to content

Instantly share code, notes, and snippets.

@lideo
Created October 8, 2019 08:09
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save lideo/82fb863749f4efe1deb9ca146b1093e8 to your computer and use it in GitHub Desktop.
Save lideo/82fb863749f4efe1deb9ca146b1093e8 to your computer and use it in GitHub Desktop.
Exclude .DS_Store file from tar.gz
tar -zcv --exclude='.DS_Store' -f file.tar.gz folder/
@ettingshausen
Copy link

And ignore ._ files

# tested on macOS 11 Big Sur
tar --disable-copyfile --exclude='.DS_Store' -cvzf file.tar.gz folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment