← 返回命令列表

Linux command

pv 命令

文件

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Show transfer progress

pv [file] > [output]

Pipe with progress

cat [file] | pv > [output]

Limit transfer rate

pv -L [1m] [file] > [output]

Show ETA

pv -e [file] > [output]

Name the transfer

pv -N "Copying" [file] > [output]

说明

pv (Pipe Viewer) monitors the progress of data flowing through a Unix pipeline. It can be inserted between any two commands in a pipe to display a progress bar, transfer rate, elapsed time, estimated time of arrival, and percentage complete. When given a file as input, pv can calculate the total size and show meaningful progress percentages. For streams of unknown size, use the -s flag to specify the expected size. The -L option limits transfer rate, which is useful for throttling operations. Multiple -N flags can name different pv instances in complex pipelines to track each stage independently. pv is commonly used to add visual feedback to operations like disk imaging with dd, database imports, or large file transfers.

参数

-L _RATE_
Rate limit.
-N _NAME_
Transfer name.
-e
Show ETA.
-p
Show percentage.
-t
Show elapsed time.
-r
Show rate.
-s _SIZE_
Expected size.

FAQ

What is the pv command used for?

pv (Pipe Viewer) monitors the progress of data flowing through a Unix pipeline. It can be inserted between any two commands in a pipe to display a progress bar, transfer rate, elapsed time, estimated time of arrival, and percentage complete. When given a file as input, pv can calculate the total size and show meaningful progress percentages. For streams of unknown size, use the -s flag to specify the expected size. The -L option limits transfer rate, which is useful for throttling operations. Multiple -N flags can name different pv instances in complex pipelines to track each stage independently. pv is commonly used to add visual feedback to operations like disk imaging with dd, database imports, or large file transfers.

How do I run a basic pv example?

Run `pv [file] > [output]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -L _RATE_ do in pv?

Rate limit.