logoalt Hacker News

heinrich599111/20/20242 repliesview on HN

There's also `progress` which works for tools mainly operating on a single file, but unlike `pv`, you don't have to start the tool differently. It'd e.g. work nicely for the `gzip` example. Just call `progress` on a different terminal while `gzip` is running.


Replies

dividuum11/20/2024

I was curious on how that’s supposed to work, so I took a quick look: It scans /proc for known commands, then looks up file descriptor information via their fd/fdinfo directory to get size/seek positions and then shows a percentage of the largest file.

fwip11/21/2024

pv also allows this, but you have to look up the process id manually, and pass it to the -d flag.