Hasty Briefsbeta

Bilingual

Tar files made in macOS generate "xattr" errors when expanded in Linux

a day ago
  • #macos
  • #tar
  • #linux
  • The author describes a workflow of creating tarballs (tar.gz) on macOS and deploying them to Linux servers.
  • When extracting tar.gz files on Linux, warnings or errors appear due to macOS's BSD tar adding extra files (like ._ files) and extended attributes.
  • These warnings are about 'unknown extended header keywords' related to macOS-specific metadata (e.g., quarantine, lastuseddate).
  • Three solutions are presented: using --no-xattrs or --disable-copyfile options with BSD tar, or installing GNU tar to replace BSD tar permanently.
  • Installing GNU tar via Homebrew and updating PATH ensures clean tar creation without extra macOS attributes.