From 1bc96c237d24d8388a2697eb447ce6413b871c1e Mon Sep 17 00:00:00 2001 From: Jacek Wielemborek Date: Tue, 26 Jan 2016 09:20:14 +0100 Subject: [PATCH] Add pv.md. --- pages/common/pv.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/pv.md diff --git a/pages/common/pv.md b/pages/common/pv.md new file mode 100644 index 000000000..76a4fc1ef --- /dev/null +++ b/pages/common/pv.md @@ -0,0 +1,27 @@ +# pv + +> Monitor the progress of data through a pipe. + +- Print the contents of the file and display a progress bar: + +`pv {{file}}` + +- Measure the speed and amount of data flow between pipes (`-s` is optional): + +`command1 | pv -s {{expected_amount_of_data_for_eta}} | command2` + +- 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: + +`pv -EE {{path_to_faulty_media}} > image.img` + +- Stop reading after reading specified amount of data, rate limit to 1K/s: + +`pv -L 1K -S {{maximum_file_size_to_be_read}}`