Skip to content

Creating a tar archive with --no-xattr doesn't exclude extended attributes #2486

Open
@AndrewBelt

Description

On MacOS 15.2 compiled from Homebrew, when creating a tar archive with the tar command, --no-xattr doesn't ignore extended attributes of files.

$ tar --version
bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 

$ touch test
# Add an extended attribute
$ xattr -w hello world test 
# Verify that it was added
$ xattr -l test 
hello: world

$ tar -c --no-xattr -f test.tar test

# Extract it to a new directory
$ mkdir a
$ tar -xf test.tar -C a
# Extended attribute is still there despite --no-xattr
$ xattr -l a/test 
hello: world

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions