Cool, but obscure unix tools :: Software architect Kristof Kovacs

http://kkovacs.eu/cool-but-obscure-unix-tools Courtesy of my Bro, Dave Hiscocks. -- Peter Hiscocks Syscomp Electronic Design Limited, Toronto http://www.syscompdesign.com USB Oscilloscope and Waveform Generator 647-839-0325

On 18 March 2015 at 20:40, <phiscock@ee.ryerson.ca> wrote:
http://kkovacs.eu/cool-but-obscure-unix-tools
Courtesy of my Bro, Dave Hiscocks.
I like his tastes quite well! Apparently I know some obscure Unix tools! :-) And better still, I am not familiar with all of them.

On Wed, Mar 18, 2015 at 11:04:00PM -0400, Christopher Browne wrote:
On 18 March 2015 at 20:40, <phiscock@ee.ryerson.ca> wrote:
http://kkovacs.eu/cool-but-obscure-unix-tools
Courtesy of my Bro, Dave Hiscocks.
I like his tastes quite well! Apparently I know some obscure Unix tools! :-) And better still, I am not familiar with all of them.
multitail sounds like it can do something I had been wishing tail would do. And yes I didn't think rsync or screen or powertop were obscure, but I guess that's just because I use them. -- Len Sorensn

On 18/03/15 11:04 PM, Christopher Browne wrote:
On 18 March 2015 at 20:40, <phiscock@ee.ryerson.ca> wrote:
http://kkovacs.eu/cool-but-obscure-unix-tools
Courtesy of my Bro, Dave Hiscocks.
I like his tastes quite well! Apparently I know some obscure Unix tools! :-) And better still, I am not familiar with all of them.
I'll add 'pv' to the list. Great way to watch progress if you are using zcat/cat to pipe something somewhere. For example, got a database dump? 'cat db.sql | pv | yoursqlengine' You get a nice progress bar and estimation of time to complete, autoscaling speed. Lots of other options too. Cheers, Jamon

On Fri, Mar 20, 2015 at 09:57:44AM -0400, Jamon Camisso wrote:
I'll add 'pv' to the list. Great way to watch progress if you are using zcat/cat to pipe something somewhere.
For example, got a database dump? 'cat db.sql | pv | yoursqlengine'
If you do that, pv does NOT know how big the input is, and you are wasting a pipe and a process. 'pv db.sql | yoursqlengine' on the other hand would work great.
You get a nice progress bar and estimation of time to complete, autoscaling speed. Lots of other options too.
-- Len Sorensen

On 20/03/15 10:05 AM, Lennart Sorensen wrote:
On Fri, Mar 20, 2015 at 09:57:44AM -0400, Jamon Camisso wrote:
I'll add 'pv' to the list. Great way to watch progress if you are using zcat/cat to pipe something somewhere.
For example, got a database dump? 'cat db.sql | pv | yoursqlengine'
If you do that, pv does NOT know how big the input is, and you are wasting a pipe and a process.
'pv db.sql | yoursqlengine' on the other hand would work great.
Ah good point - the progress bar isn't accurate the way that I use it with zcat. I don't suppose there's a way to make that work with a stream is there? Cheers, Jamon

If you know the size of the uncompressed file, you can tell it to pv and the progress will be accurate. There is a parameter for that. On Mar 20, 2015 3:10 PM, "Jamon Camisso" <jamon.camisso@utoronto.ca> wrote:
On 20/03/15 10:05 AM, Lennart Sorensen wrote:
On Fri, Mar 20, 2015 at 09:57:44AM -0400, Jamon Camisso wrote:
I'll add 'pv' to the list. Great way to watch progress if you are using zcat/cat to pipe something somewhere.
For example, got a database dump? 'cat db.sql | pv | yoursqlengine'
If you do that, pv does NOT know how big the input is, and you are wasting a pipe and a process.
'pv db.sql | yoursqlengine' on the other hand would work great.
Ah good point - the progress bar isn't accurate the way that I use it with zcat. I don't suppose there's a way to make that work with a stream is there?
Cheers, Jamon --- Talk Mailing List talk@gtalug.org http://gtalug.org/mailman/listinfo/talk

On Fri, Mar 20, 2015 at 10:10:35AM -0400, Jamon Camisso wrote:
Ah good point - the progress bar isn't accurate the way that I use it with zcat. I don't suppose there's a way to make that work with a stream is there?
If you happen to know the size, you can tell pv with an argument what it is, but otherwise, no. Of course you could do: pv db.sql.gz | zcat | yoursqlengine Then the progress will be based on the compressed data rather than uncompressed, but that might be fine in most cases. Sure if you have a huge gob of highly compressed data in the middle, it might slow down the processing at the end of the pipe and your progress would be off, but that's probably an unusual case. So yes, it is hard to do progress bars well if you don't know how much work you are going to do before you finish doing it. -- Len Sorensen
participants (5)
-
Christopher Browne
-
Jamon Camisso
-
Lennart Sorensen
-
Mauro Souza
-
phiscock@ee.ryerson.ca