Mimsy Were the Borogoves

Hacks: Articles about programming in Python, Perl, Swift, BASIC, and whatever else I happen to feel like hacking at.

Pipe viewer command-line progress report

Jerry Stratton, November 6, 2013

I’m sitting here waiting for a two and a half gigabyte MySQL dump file to make its way to the Amazon Cloud and basically the only way I have to monitor its progress is opening up a Sequel Pro window and wait for new databases to show up.

I thought I’d do a search on MySQL dump progress reports, and I found a neat little utility called pipe viewer that really ought to be standard on Mac OS X and Linux.

  • pv Y2013M11D06.sql | wc
  • 2.47GiB 0:00:11 [ 212MiB/s] [========================================================================>] 100%
  • 98159 122143517 2648450403

It took about 11 seconds to complete, and as it completed the progress bar made its way across the window.

Note that I don’t have MacPorts or HomeBrew installed; a simple ./configure and make worked fine.

File this under: Why did I not already know about this!

  1. <- AppleScript shell
  2. Timeout retry ->