2016-01-26 08:20:14 +00:00
|
|
|
# pv
|
|
|
|
|
|
|
|
> Monitor the progress of data through a pipe.
|
2021-10-06 22:51:52 +01:00
|
|
|
> More information: <https://manned.org/pv>.
|
2016-01-26 08:20:14 +00:00
|
|
|
|
|
|
|
- Print the contents of the file and display a progress bar:
|
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`pv {{path/to/file}}`
|
2016-01-26 08:20:14 +00:00
|
|
|
|
2022-12-29 23:06:09 +00:00
|
|
|
- Measure the speed and amount of data flow between pipes (`--size` is optional):
|
2016-01-26 08:20:14 +00:00
|
|
|
|
2022-12-29 23:06:09 +00:00
|
|
|
`command1 | pv --size {{expected_amount_of_data_for_eta}} | command2`
|
2016-01-26 08:20:14 +00:00
|
|
|
|
|
|
|
- Filter a file, see both progress and amount of output data:
|
|
|
|
|
|
|
|
`pv -cN in {{big_text_file}} | grep {{pattern}} | pv -cN out > {{filtered_file}}`
|
|
|
|
|
|
|
|
- Attach to an already running process and see its file reading progress:
|
|
|
|
|
|
|
|
`pv -d {{PID}}`
|
|
|
|
|
|
|
|
- Read an erroneous file, skip errors as `dd conv=sync,noerror` would:
|
|
|
|
|
2016-07-13 09:53:22 +01:00
|
|
|
`pv -EE {{path/to/faulty_media}} > image.img`
|
2016-01-26 08:20:14 +00:00
|
|
|
|
|
|
|
- Stop reading after reading specified amount of data, rate limit to 1K/s:
|
|
|
|
|
2022-12-29 23:06:09 +00:00
|
|
|
`pv -L 1K --stop-at --size {{maximum_file_size_to_be_read}}`
|