1

I need to archive and compress a large number of files but some of those files may have extended attributes whose content I don't want to lose.

My understanding is that zip doesn't do that. Is there something that does?

I believe that some versions of tar support extended attributes, but I'd prefer being able to access individuals files in the archive without having to decompress the entire archive as I have to with tar.

This is Linux only.

1 Answers1

0

I'm using absolute paths here:

Use tar:

tar --xattrs cjf file.tar.bz2 /path/to/files

For extract a file:

tar xjf file.tar.bz2 path/to/files/dir/file-to-extract -C /

Cheers!