← 返回命令列表

Linux command

xar 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Create archive

xar -cf [archive.xar] [files]

Extract archive

xar -xf [archive.xar]

List contents

xar -tf [archive.xar]

Verbose extraction

xar -xvf [archive.xar]

Extract to directory

xar -xf [archive.xar] -C [directory]

说明

xar (eXtensible ARchive) creates and extracts archives using a format developed by Apple, primarily used for macOS installer packages. The format uses an XML-based table of contents that supports rich metadata and multiple compression algorithms per file. The archive format also includes signature support for code signing and integrity verification. While primarily associated with macOS, xar is available on Linux for working with macOS package files and other XAR archives.

参数

-c
Create archive.
-x
Extract archive.
-t
List contents.
-f _FILE_
Archive file.
-v
Verbose.
-C _DIR_
Target directory.

FAQ

What is the xar command used for?

xar (eXtensible ARchive) creates and extracts archives using a format developed by Apple, primarily used for macOS installer packages. The format uses an XML-based table of contents that supports rich metadata and multiple compression algorithms per file. The archive format also includes signature support for code signing and integrity verification. While primarily associated with macOS, xar is available on Linux for working with macOS package files and other XAR archives.

How do I run a basic xar example?

Run `xar -cf [archive.xar] [files]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c do in xar?

Create archive.