PV(1)
๐ฆ pv(1) โ User Commands, but make it group-chat ๐
okay so bestie, this is pv: the main-character tool that monitors and manages the progress of data through a pipe ๐ซถ no cap, it's the glow-up your terminal deserves.
โจ NAME โจ
pv โ monitor and manage the progress of data through a pipe ๐
๐ SYNOPSIS ๐
pv [OPTION]... [FILE]...
pv [OPTION]... -d|--watchfd PID[:FD]|=NAME|@LISTFILE...
pv -R|--remote PID [OPTION]...
pv -Q|--query PID [OPTION]...
pv [OPTION]... -M|--monitor SIDE -- COMMAND [ARGS]...
๐ DESCRIPTION ๐
Show the progress of data through a pipeline by giving information such as time elapsed, percentage completed (with progress bar), current throughput rate, total data transferred, and ETA. The data flow rate, error handling strategy, buffer size, and cache interaction can all be adjusted. literally all the little knobs are there, bestie ๐๏ธ
Each FILE is copied to standard output. With no FILE, or when FILE is -, standard input is read.
In --watchfd mode, inspect another process and show its progress through the files it has open. it's giving โI see you, bestieโ energy ๐
In --monitor mode, run a command and display the progress of data through both its standard input and its standard output.
๐ OPTIONS ๐
๐๏ธ Display switches
If no display switches are specified, pv behaves as if --progress, --timer, --eta, --rate, and --bytes had been given. Otherwise, only those display types that are explicitly switched on will be shown. periodt ๐ซ
-p,--progressโ Turn the progress bar on. If any inputs are not files, or are unreadable, and no size was explicitly given with--size, the progress bar cannot indicate how close to completion the transfer is, so it will just move left and right to indicate that data is moving โ or, with--gauge, the bar will indicate the current rate as a percentage of the maximum rate seen so far. she's doing her best, okay? ๐ญ-t,--timerโ Turn the timer on. This will display the total elapsed time thatpvhas been running for.-e,--etaโ Turn the ETA countdown on. This will estimate, based on current transfer rates and the total data size, how long it will be before completion. The countdown is prefixed withETA. This option will have no effect if the total data size cannot be determined. lowkey mysterious when that happens, but that's the rule ๐ซ-I,--finetaโ Turn the ETA countdown on, but display the estimated local time at which the transfer will finish, instead of the amount of time remaining. When the estimated time is more than 6 hours in the future, the date is shown as well. The time is prefixed withFINfor finish time. As with--eta, this option will have no effect if the total data size cannot be determined.-r,--rateโ Turn the rate counter on. This will display the current rate of data transfer. The rate is shown in square brackets[].-a,--average-rateโ Turn the average rate counter on. This will display the current average rate of data transfer, over the last 30 seconds by default (see--average-rate-window). The average rate is shown in brackets().-b,--bytesโ Turn the total byte counter on. This will display the total amount of data transferred so far.-T,--buffer-percentโ Turn on the transfer buffer percentage display. This will show the percentage of the transfer buffer in use. Implies--no-splice. The transfer buffer percentage is shown in curly brackets{}.-A NUM,--last-written NUMโ Show the lastNUMbytes written. Implies--no-splice.-F FORMAT,--format FORMATโ Ignore all of the above options and instead use the format stringFORMATto determine the output format. See the FORMATTING section below. custom era โจ-n,--numericโ Numeric output. Instead of giving a visual indication of progress, write an integer percentage, one per line, on standard error, suitable for passing to a tool such asdialog(1). Note that--forceis not required if--numericis being used.- Combining
--numericwith--byteswill cause the number of bytes processed so far to be output instead of a percentage. Adding--line-modeas well as--byteswrites the number of lines instead of bytes or a percentage. Adding--rateadds the transfer rate to each output line (if--bytesis also in use, the rate comes after the byte/line count). Adding--timerprefixes each output line with the elapsed time so far, as a decimal number of seconds. - Combining
--numericwith--formatallows for custom output. The default format string components for--numericare%t %b %r %{progress-amount-only}in that order, each item being active or inactive according to the rules above (so the default with no other options is%{progress-amount-only}).
- Combining
-q,--quietโ No output. Useful if the--rate-limitoption is being used on its own to limit the transfer rate of a pipe. shhh ๐คซ
๐๏ธ Output modifiers
-8,--bitsโ Use bits instead of bytes for the byte and rate counters. The output suffix will bebinstead ofB.-k,--siโ Display and interpret suffixes as multiples of 1000 rather than the default of 1024. Note that this only takes effect on options after this one, so for consistency, specify this option first. order matters, bestie ๐ง-W,--waitโ Wait until the first byte has been transferred before showing any progress information or calculating any ETAs. For example, use this option when piping data into tools such asgpg(1)ormysql -pso the count only starts after the password prompt has been answered.-D SEC,--delay-start SECโ Wait untilSECseconds have passed before showing any progress information, so that a transfer that is over quickly won't display anything. The value ofSECcan be a decimal such as0.5.-s SIZE,--size SIZEโ Assume the total amount of data to be transferred isSIZEbytes when calculating percentages and ETAs. A suffix ofK,M,G, orTcan be added to denote kibibytes (*1024), mebibytes, gibibytes, tebibytes. If--siappears before this option, suffixes will denote kilobytes (*1000), megabytes, and so on instead.
If SIZE starts with @, the size of file whose name follows the @ will be used; if that is a directory, the size of all files under it will be used, like du --apparent-size -b.
-g,--gaugeโ If the progress bar is shown but the size is not known, then instead of moving the bar left and right to show progress, show the current transfer rate as a percentage of the maximum rate seen so far. she's improvising ๐-l,--line-modeโ Instead of counting bytes, count lines (newline characters). The progress bar will only move when a new line is found, and the value passed to--sizewill be interpreted as a line count.
If this option is used without --size, the "total size" (in this case, total line count) is calculated by reading through all input files once before transfer starts. If any inputs are pipes or non-regular files, or are unreadable, the total size will not be calculated.
-0,--nullโ Count lines as terminated with a null byte instead of with a newline. This option implies--line-mode.-i SEC,--interval SECโ WaitSECseconds between updates. The default is to update every second. The value ofSECcan be a decimal such as0.1.-m SEC,--average-rate-window SECโ Compute current average rate over aSECseconds window for average rate and ETA calculations. The default is 30 seconds. The value must be an integer.-w WIDTH,--width WIDTHโ Assume the terminal isWIDTHcolumns wide, instead of autodetecting the width (or assuming 80 if detection fails). If this option is used, the output width will not be adjusted if the width of the terminal changes while the transfer is running.-H HEIGHT,--height HEIGHTโ Assume the terminal isHEIGHTrows high, instead of autodetecting the height (or assuming 25 if detection fails). If this option is used, the output height will not be adjusted if the height of the terminal changes while the transfer is running.-N NAME,--name NAMEโ Prefix the output information withNAME. Often used with--cursorto identify each progress bar in a pipeline containing more than onepv. name tag but make it terminal ๐ท๏ธ-u STYLE,--bar-style STYLEโ Change the default progress bar style shown by--progress, or by the--formatsequences%{progress}or%{progress-bar-only}, toSTYLE. TheSTYLEcan be one of plain (the default), block, granular, or shaded. These styles are described in the FORMATTING section below.-x SPEC,--extra-display SPECโ As well as displaying progress to the terminal, also write it toSPEC. TheSPECmust start with a comma-separated list of destinations, and can optionally be followed by a colon and a format string. The destinations can be windowtitle or window for the xterm window title, and processtitle, proctitle, process, or proc for the process title displayed byps(1). If a format string is not supplied, the same format is used as for the terminal. For example,-x 'window,process:%t %b %r'will show the elapsed time, bytes transferred, and rate, in both the window title and the process title.-9,--conemuโ As well as displaying progress to the terminal, also emit the ConEmu "progress bar" sequences (OSC 9;4) to show the progress percentage in the terminal's title tab, on terminals which support it. This is equivalent to adding%{progress-conemu}to the--formatstring.-v,--statsโ At the end of the transfer, write an additional line showing the transfer rate minimum, mean, maximum, and standard deviation. The values are always in bytes per second (or bits, with--bits).-f,--forceโ Force output. Normally,pvwill not output any visual display if standard error is not a terminal. This option forces it to do so. she said โI'm showing up anywayโ ๐-c,--cursorโ use cursor positioning escape sequences to move to the initial terminal row when updating the display, instead of only using carriage returns. This lets multiplepvinstances show progress together on the same terminal. For example:
pv --cursor --name input file.gz | gzip -d | pv --cursor --name output > file
As the example shows, this is often used with --name. group-chat progress bars, iconic ๐
๐ Data transfer modifiers ๐
-o FILE,--output FILEโ write data to FILE instead of standard output. If the file already exists, it will be truncated. bye-bye old contents ๐ซถ-L RATE,--rate-limit RATEโ limit the transfer to a maximum of RATE bytes per second. The same suffixes as--sizecan be used. Decimal values are allowed. Specifying0will turn off rate limiting, which is useful with--remote. slow and steady wins the pipeline race ๐ข-B BYTES,--buffer-size BYTESโ use a transfer buffer size of BYTES bytes. The same suffixes as--sizecan be used. The default buffer size is the block size of the input file's filesystem multiplied by 32 (512KiB max), or 400KiB if the block size cannot be determined. This can be useful on platforms like macOS with pipelines that perform better with specific buffer sizes such as 1024. Implies--no-splice. yes bestie, buffer tuning is real โจ-C,--no-spliceโ prevent the use ofsplice(2)andcopy_file_range(2), which are normally used on systems that support it to improve efficiency by eliminating the need for a transfer buffer.
In the default case that splice(2) or copy_file_range(2) are used, the lack of a transfer buffer prevents --buffer-percent and --last-written from working and makes --buffer-size redundant, so using any of those options automatically switches on --no-splice.
Sparse files cannot be written with splice(2) or copy_file_range(2), so using --sparse automatically switches on --no-splice.
Switching on --no-splice results in a small loss of transfer efficiency. It has no effect on systems where splice(2) and copy_file_range(2) are unavailable. trade-offs, but make it informed ๐
-J BYTES,--pipe-buffer-size BYTESโ attempt to set the size of the output pipe buffer, and the intermediate input pipe buffer if one is needed, to BYTES bytes. This will silently do nothing if the requested size cannot be achieved. If this option is not specified, and both the output and the first input are pipes, then the output pipe buffer size will automatically be increased to match the input pipe buffer, if it was smaller. pipe glow-up, no cap ๐ซถ-E,--skip-errorsโ ignore read errors by attempting to skip past the offending sections. The corresponding parts of the output will be null bytes. At first only a few bytes will be skipped, but if there are many errors in a row then the skips will move up to chunks of 512. This is intended to be similar todd conv=sync,noerror.
Specify --skip-errors twice to only report a read error once per file, instead of reporting each byte range skipped. messy media? we move ๐
-Z BYTES,--error-skip-block BYTESโ when ignoring read errors with--skip-errors, instead of trying to adaptively skip by reading small amounts and skipping progressively larger sections until a read succeeds, move to the next file block of BYTES bytes as soon as an error occurs. There may still be some shorter skips where the block being skipped coincides with the end of the transfer buffer. The same suffixes as--sizecan be used.
This option can only be used with --skip-errors and is intended for use when reading from a block device, such as --skip-errors --error-skip-block 4K to skip in 4 kibibyte blocks. This will speed up reads from faulty media, at the expense of potentially losing more data. faster rescue, but bestieโฆ data may be lost, ok? ๐
-S,--stop-at-sizeโ if a size was specified with--size, stop transferring data once that many bytes have been written, instead of continuing to the end of input. we said enough, so we mean enough ๐-Y,--syncโ after every write operation, synchronise the buffer caches to disk withsync(2), orfdatasync(2)if possible. This has no effect when the output is a pipe. Using--syncmay improve the accuracy of the progress bar when writing to a slow disk. flush it, feel it, trust it โจ-K,--direct-ioโ set theO_DIRECTflag on all inputs and outputs, if it is available. This will minimise the effect of caches, at the cost of performance. Due to memory alignment requirements, it also may cause read or write failures with an error of โInvalid argumentโ, especially if reading and writing files across a variety of filesystems in a singlepvcall. Use this option with caution. caution bestie, this one bites ๐ญ-O,--sparseโ when writing null bytes, try to seek, producing a sparse output file. Implies--no-splice. On filesystems without sparse file support, or when the output is not seekable, this option will have no effect other than to turn on--no-splice. holes in the file, but make it intentional ๐ณ๏ธโจ-X,--discardโ instead of transferring input data to standard output, discard it. This is equivalent to redirecting standard output to/dev/null, except thatwrite(2)is never called. read it, ghost it, no writes ๐ซถ-U FILE,--store-and-forward FILEโ instead of passing data through immediately, do it in two stages - first read all input and write it to FILE, and then once the input is exhausted, read all of FILE and write it to the output. FILE remains in place afterwards, unless it is-, in which casepvcreates a temporary file for this purpose, and automatically removes it afterwards.
A common use for this is this where one part of a pipeline generates data quickly but of unknown size, and the next part processes it slowly. With quick | pv -U - | slow, a progress bar is displayed with unknown size for the quick part, then a second is shown with a known size and ETA for the slow part. two-act pipeline drama, with ETA ๐ฌ
๐ Alternative operating modes ๐
-d,--watchfd PID[:FD]|=NAME|@LISTFILE...โ instead of transferring data, watch file descriptor FD of process PID, and show its progress. Other data transfer modifiers - and remote control - may not be used with this option.
If a PID is specified without an FD, then that process will be watched, and all regular files and block devices it opens will be shown with a progress bar.
If a NAME is specified, prefixed with =, then processes with that name will be found with pgrep(1), and as watched described above.
If a LISTFILE is specified, prefixed with @, the lines in that file will be used as additional arguments.
All remaining non-option arguments will also be treated as additional arguments.
The pv process will exit when all FDs have either changed to a different file, changed read/write mode, or have closed, and all PIDs (without a specific FD) have exited. spy mode, but for file descriptors ๐
-R PID,--remote PIDโ remotely control another instance ofpvwith process ID PID, making it act as though it had been given this instance's command line. For example, ifpv --rate-limit 123Kis running with process ID 9876, then runningpv --remote 9876 --rate-limit 321Kwill cause process 9876 to start using a rate limit of 321KiB instead of 123KiB. Note that some options cannot be changed while running, such as--cursor,--line-mode,--force,--delay-start,--skip-errors, and--stop-at-size. remote-control your other pv bestie ๐ฎ-Q PID,--query PIDโ display the transfer progress of another instance ofpvwith process ID PID, owned by the same user.
Some output modifiers can only be used while querying another process if they match those of that process - such as --line-mode, --null, and --average-rate-window. Data transfer modifiers will have no effect. just checking in on your progress, bestie ๐ซถ
-M SIDE,--monitor SIDEโ run the command specified by the remaining arguments, and monitor its standard input, its standard output, or both, depending on whether SIDE isin,out, orboth. Use--after all of thepvoptions to keep the monitored command's options separate.
With a SIDE of both, two progress bars will be shown. All of pv's display switches, output modifiers, and data transfer modifiers will apply to both sides.
For example, pv --cursor --monitor both -- gzip -9 is equivalent to pv --cursor | gzip -9 | pv --cursor, except that the latter can't show the input:output ratio.
When SIDE is both, the --format, --name, and --pidfile options may be specified twice. Each option's first appearance applies to the input side, and the second applies to the output side.
The default format, when SIDE is both and no --format options are specified, is based on the other display switches as normal, except that the ratio (%{ratio}) is added to the output side.
The values 0, 1, and 2 may be used as synonyms for in, out, and both.
This option cannot be used with --store-and-forward. double-bar monitor mode, main character energy ๐
๐ Other options ๐
-P FILE,--pidfile FILEโ save the process ID ofpvin FILE. The file will be replaced if it already exists, and will be removed whenpvexits. Whilepvis running, FILE will contain a single number - the process ID ofpv- followed by a newline.
With --monitor, the first --pidfile always specifies the file to write the main monitor's process ID to, and the second is only used in --monitor both mode to store the process ID of the monitor watching the output side. pidfile receipts, kept tidy ๐งพโจ
-h,--helpโ print a usage message on standard output and exit successfully. help is here, bestie ๐-V,--versionโ print version information on standard output and exit successfully. version check, slay ๐
โจ FORMATTING โจ
Okay so format strings are the whole vibe here โ these are the little sequences you can put inside --format and --extra-display, and they're what makes your progress bar go from "meh" to "main character energy." ๐
Here's the complete list, bestie, no skips:
%p,%{progress}โ the progress bar itself (with a percentage tacked on the end if the size is actually known, which, slay). Equivalent to--progress. It expands to fill whatever space is left over unless you prefix it with a number to set the width, like%20por%20{progress}.%{progress-bar-only}โ progress bar, but make it minimal: no sides, no percentage shown afterwards. Expands to fill the remaining space unless prefixed by a number.%{progress-amount-only}โ just the percentage completion (or the maximum rate, if you're using--gaugeand the size is unknown).%{progress-conemu}โ emits the ConEmu "progress bar" sequences (OSC 9;4) so the progress percentage shows up in your terminal's title tab, on the terminals that support it. ๐ช%{bar-plain}โ progress bar in the standard plain format, no sides, no percentage afterwards. Expands to fill the remaining space unless prefixed by a number.%{bar-block}โ progress bar using Unicode full blocks, no sides, no percentage afterwards. Expands to fill the remaining space unless prefixed by a number. If UTF-8 output isn't available, it falls back to the plain format. ๐งฑ%{bar-granular}โ progress bar using Unicode full blocks plus 1/8th blocks for partial fills, so the display is way more granular. Like the other%{bar}strings: no sides, no percentage afterwards, and it expands to fill the remaining space unless prefixed by a number. If UTF-8 output isn't available, plain format it is.%{bar-shaded}โ progress bar using Unicode full blocks and shade characters โ dark and medium shade for the partial fills, light shade for the background. Like the other%{bar}strings: no sides, no percentage afterwards, expands to fill the remaining space unless prefixed by a number. If UTF-8 output isn't available, plain format, obviously.%t,%{timer}โ elapsed time. Equivalent to--timer. โฑ๏ธ%e,%{eta}โ ETA as time remaining. Equivalent to--eta.%I,%{fineta}โ ETA as the local time at which the transfer will finish. Equivalent to--fineta. ๐ฐ๏ธ%r,%{rate}โ current data transfer rate. Equivalent to--rate.%a,%{average-rate}โ average data transfer rate. Equivalent to--average-rate.%b,%{bytes},%{transferred}โ bytes transferred so far (or lines, if--line-modewas specified). Equivalent to--bytes. And heads up: if--bitswas specified,%bshows the bits transferred so far, not bytes. ๐ค%{ratio}โ shows the ratio of bytes transferred by the other side to the bytes transferred by this side, in--monitor bothmode.%T,%{buffer-percent}โ percentage of the transfer buffer in use. Equivalent to--buffer-percent, but using it doesn't turn on--no-splice.
So if the transfer is using splice(2), it displays {----}; if the transfer is using splice(2) via an intermediate input pipe, it displays {-||-}; and if the transfer is using copy_file_range(2), it displays {--->}.
%nA,%n{last-written}โ shows the last n bytes written (so like,%16Ashows the last 16 bytes). Shows only dots if the transfer is usingsplice(2)orcopy_file_range(2), because those transfer modes don't use the buffer. ๐%nL,%n{previous-line}โ shows the first n bytes of the most recently written line (so%40Lshows the first 40 bytes). If you don't give an n, it expands to fill the available space. Shows only spaces if the transfer is usingsplice(2)orcopy_file_range(2).%N,%{name}โ shows the name prefix given by--name. Padded to 9 characters with spaces, and suffixed with:.%{sgr:colour,...}โ emits ECMA-48 SGR (Select Graphic Rendition) codes if the terminal supports colours, where colour,... is a comma-separated list of any of the keywords below, or the numeric values fromconsole_codes(4). If colour support isn't available, nothing is emitted. ๐
The supported keywords are: reset or none, black, red, green, brown or yellow, blue, magenta, cyan, white, fg-black, fg-red, fg-green, fg-brown or fg-yellow, fg-blue, fg-magenta, fg-cyan, fg-white, fg-default, bg-black, bg-red, bg-green, bg-brown or bg-yellow, bg-blue, bg-magenta, bg-cyan, bg-white, bg-default, bold, dim, italic, underscore or underline, blink, reverse, no-bold or no-dim, no-italic, no-underscore or no-underline, no-blink, no-reverse.
With colours, the optional "fg-" prefix indicates foreground; a prefix of "bg-" indicates background.
For example, %{sgr:green,bold}TEXT%{sgr:reset} will make TEXT bold green on supported terminals. ๐
%%โ a single%. That's it. That's the whole thing.
Any other contents are reproduced in the progress display as-is โ so go off, honestly.
Also, the format string equivalent of the default display switches is %b %t %r %p %e. Iconic.
๐ธ EXAMPLES ๐ธ
Some suggested common switch combos, curated for your convenience:
pv -ptebarโ shows a progress bar, elapsed time, estimated completion time, byte counter, average rate, and current rate.pv -betlapโ shows a progress bar, elapsed time, estimated completion time, line counter, and average rate, counting lines instead of bytes.pv -btrpgโ shows the amount transferred, elapsed time, current rate, and a gauge showing the current rate as a percentage of the maximum rate seen โ super useful in a pipeline where the total size is unknown. (And if the size is known, these options show the percentage completion instead of the rate gauge. iykyk.)pv -tโ shows only the elapsed time โ great as a simple timer, likesleep 10m | pv -t.pv -pterbโ the default behaviour: progress bar, elapsed time, estimated completion time, current rate, and byte counter.pv --format='%{progress-conemu}%{bytes} %{timer} %{rate} %{progress} %{eta}'โ shows the byte counter, elapsed time, current rate, progress bar, and ETA, and shows the percentage progress in the terminal's tab bar, on terminals that support ConEmu OSC 9;4 sequences.
On macOS, it may be useful to specify --buffer-size 1024 in a pipeline, since this may improve performance. ๐
To watch how quickly a file is transferred using nc(1):
pv file | nc -w 1 somewhere.com 3000
A similar example, transferring a file from another process and passing the expected size to pv:
cat file | pv --size 12345 | nc -w 1 somewhere.com 3000
To watch the progress of creating a tar.gz archive:
tar cf - directory/ \
| pv --size $(du -sb directory/ | awk '{print $1}') \
| gzip -9 \
> out.tar.gz
An alternative way of doing the same thing:
tar cf - directory/ \
| pv --size @directory/ \
| gzip -9 \
> out.tar.gz
Taking an image of a disk, skipping errors:
pv -EE /dev/your/disk/device > disk-image.img
Writing an image back to a disk:
pv disk-image.img > /dev/your/disk/device
Zeroing a disk:
pv < /dev/zero > /dev/your/disk/device
Okay so heads up bestie: if the input size can't be calculated, and the output is a block device, then the size of the block device will be used and pv will automatically stop at that size as if --stop-at-size had been given. โจ
(Linux and macOS only): watching file descriptor 3 opened by another process 1234:
pv --watchfd 1234:3
(Linux and macOS only): watching all file descriptors used by process 1234:
pv --watchfd 1234
Rate-limiting the transfer between two processes in a pipeline, with no display:
producer | pv --quiet --rate-limit 1M | consumer
Sending logs to a processing script, showing the most recent line as part of the progress display:
pv --no-splice --format '%a %p : %L' big.log | processing-script
Showing progress as lines of JSON data:
pv --numeric --format '{"elapsed":%t,"bytes":%b,"rate":%r,"percentage":%{progress-amount-only}}' big.log | processing-script
๐ EXIT STATUS ๐
Okay so exit codes, let's get into it โ because knowing why it bailed is honestly so important:
An exit status of 1 indicates a problem with the --remote, --query, --pidfile, or --monitor options.
Any other exit status is a bitmask of the following:
2โ one or more files could not be accessed,stat(2)ed, or opened.4โ an input file was the same as the output file.8โ internal error with closing a file or moving to the next file.16โ there was an error while transferring data from one or more input files.32โ a signal was caught that caused an early exit.64โ memory allocation failed.
A zero exit status indicates no problems. ๐ซถ
๐ฆ ENVIRONMENT ๐ฆ
The following environment variables may affect pv โ yes, they're lurking in your shell, bestie:
HOMEโ the current user's home directory. This may be used by--remoteand--queryto exchange messages between pv instances: if the/run/user/UID/directory does not exist (where UID is the current user ID), then$HOME/.pv/will be used instead. ๐TMPDIR,TMPโ the directory to create per-tty lock files for the terminal when using--cursor. IfTMPDIRis set to a non-empty value, it's the directory under which lock files are created. Otherwise,TMPis used. If neither are set, then/tmpis used. ๐
โจ NOTES โจ
Okay bestie, these are the little gremlins that can sneak up on you ๐:
- In some versions of
bash(1)andzsh(1), the construct<(pv filename)will not output any progress to the terminal when run from an interactive shell, due to the subprocess being run in a separate process group from the one that owns the terminal. In these cases, use--force. ๐ - If
pvis used in a pipeline inzshversion5.8, and the last command in the pipeline is based on shell builtins,zshtakes control of the terminal away frompv, preventing progress from being displayed. For example, this will produce no progress bar:
pv InputFile | { while read -r line; do sleep 0.1; done; }
To work around this, put the last commands of the pipeline in normal brackets to force the use of a subshell:
pv InputFile | ( while read -r line; do sleep 0.1; done; )
Refer to issue #105 for full details. ๐ซถ
- The
--remoteand--queryoptions require that either/run/user/<uid>/or$HOME/can be written to, for inter-process communication. ๐ฐ๏ธ - The
--sizeoption has no effect if used with--watchfd PIDto watch all file descriptors of a process, but will work with--watchfd PID:FDto watch a single file descriptor. ๐ - If the input size cannot be calculated, and the output is a block device, then
pvwill read the output device's size, use that as if it had been passed to--size, and activate--stop-at-size. ๐ง - The
%nAand%nLformat sequences may not be effective with small input files, and%nLmay be a few lines out due to buffering within the pipeline itself. ๐ญ - Numbers passed to
--size,--buffer-size,--pipe-buffer-size, and--error-skip-blockmay all be expressed as decimals if followed by a suffix, so for example--size 1.5Gis equivalent to--size 1536M. ๐ - Numbers passed to
--rate-limitmay be expressed as decimals with or without a suffix. ๐ - Numbers passed to
--intervaland--delay-startmay be integers or decimals, but may not have a suffix. โญ - Numbers passed to
--last-written,--width,--height,--average-rate-window,--remote, and--querymust be integers with no suffix. ๐ฅ - When
--sparseis in effect and output is being written to a file, that file may look like it has stopped growing if inspected withls(1)while null bytes are being written, even thoughpvstill reports progress. This is because of the way sparse output is achieved, and the file will be the correct size when the transfer ends. ๐
๐ REPORTING BUGS ๐
Please report bugs or feature requests via the issue tracker linked from the pv home page. ๐
๐ SEE ALSO ๐
cat(1), splice(2), copy_file_range(2), fsync(2), fdatasync(2), open(2) (for O_DIRECT), console_codes(4)
๐ COPYRIGHT ๐
Copyright ยฉ 2002-2008, 2010, 2012-2015, 2017, 2021, 2023-2026 Andrew Wood.
License GPLv3+: GNU GPL version 3 or later.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Please see the package's ACKNOWLEDGEMENTS file for a complete list of contributors.
That's the whole page, bestie โ pv-1.12.7, dated 2026-11-01, and it's PV(1) ๐โจ
๐ฆ where this page comes from
- arch rolling: pv 1.12.7-1 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms