Linux command
zrun 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Run command on compressed file
zrun [command] [file.gz]
Run diff on two compressed files
zrun diff [file1.gz] [file2.gz]
Run less on gzipped file
zrun less [file.gz]
说明
zrun transparently decompresses compressed file arguments to temporary files before passing them to the specified command. It detects which arguments are compressed files by their extension, decompresses only those to temporary files (not pipes), runs the command with the decompressed paths, then cleans up. This is useful for running commands that don't natively support compressed input without manual decompression steps. The following compression types are supported: gz, bz2, Z, xz, lzma, lzo. If zrun is symlinked to a name beginning with z (e.g., zprog), executing the link is equivalent to running zrun prog.
FAQ
What is the zrun command used for?
zrun transparently decompresses compressed file arguments to temporary files before passing them to the specified command. It detects which arguments are compressed files by their extension, decompresses only those to temporary files (not pipes), runs the command with the decompressed paths, then cleans up. This is useful for running commands that don't natively support compressed input without manual decompression steps. The following compression types are supported: gz, bz2, Z, xz, lzma, lzo. If zrun is symlinked to a name beginning with z (e.g., zprog), executing the link is equivalent to running zrun prog.
How do I run a basic zrun example?
Run `zrun [command] [file.gz]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more zrun examples?
This page includes 3 examples for zrun, plus related commands for nearby Linux tasks.