← 返回命令列表

Linux command

pax 命令

文件

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

常用示例

Create archive

pax -wf [archive.pax] [directory]

Extract archive

pax -rf [archive.pax]

List archive contents

pax -f [archive.pax]

Copy directory

pax -rw [source] [destination]

Create compressed archive

pax -wf - [directory] | gzip > [archive.pax.gz]

说明

pax is the POSIX archiver. Combines tar and cpio functionality. The tool creates and extracts archives. Portable archive exchange format.

参数

-r
Read (extract) archive.
-w
Write (create) archive.
-f _FILE_
Archive file.
-v
Verbose output.
-d
Match directories only.
-k
Don't overwrite existing files.

FAQ

What is the pax command used for?

pax is the POSIX archiver. Combines tar and cpio functionality. The tool creates and extracts archives. Portable archive exchange format.

How do I run a basic pax example?

Run `pax -wf [archive.pax] [directory]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r do in pax?

Read (extract) archive.