Skip to content
Tech News
← Back to articles

Tar Files Created on macOS Display Errors When Extracting on Linux (2024)

read original get The Unarchiver for Mac → more articles
Why This Matters

This article highlights a compatibility issue where tar files created on macOS display errors and warnings when extracted on Linux systems, primarily due to extended attributes and metadata specific to macOS. This can impact developers and system administrators by complicating file transfers and deployments across different operating systems, emphasizing the need for better cross-platform compatibility and awareness of filesystem differences.

Key Takeaways

I use my MacBook as my development machine and Debian / Ubuntu / Red Hat Linux at work and on this website. I occasionally create tarballs, or tar.gz and tgz files on Mac, which are then deployed on Linux servers. When I untar the tar.gz file on the Linux server, it may throw errors or warnings.

Creating tar files

I create tar.gz files the regular way. For example, if I want to create a tar.gz file of a directory pix containing pictures.

tar -cvzf pix.tar.gz pix

That command will create a tar gzipped file pix.tar.gz .

SCP to Linux server

I will scp this tar.gz to myserver.tld as user and under the /tmp directory

scp pix.tar.gz [email protected]:/tmp/

Extract or untar pix.tar.gz

Now, I will extract this gzipped tar file on the Linux server.

... continue reading