[GRASS5] "sync" in scripts

Glynn Clements glynn at gclements.plus.com
Mon Nov 14 04:24:44 EST 2005


Hamish wrote:

> how portable is it to use the "sync" command in shell scripts?
> 
> Currently a couple of scripts that use the netpbm tools use a "sleep 1"
> command to wait for the disk write, but sync is more appropriate?

What is the reason for running "sync"?

AFAIK, the only useful reason for calling sync is if you want the
following command(s) to run as fast as possible without being slowed
down by excessive disk access.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list