help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] When is it useful to use "sync"?


From: Greg Wooledge
Subject: Re: [Help-bash] When is it useful to use "sync"?
Date: Wed, 25 Sep 2013 11:59:33 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Sep 25, 2013 at 03:49:17PM +0000, adrelanos wrote:
> Any cases, where "sync" is useful in bash scripts?

This question has nothing to do with bash, per se.  sync is a tool used
in system administration.  It is supposed to tell the operating system
to flush all buffered disk writes immediately, rather than waiting,
because you (the human system admin) fear that there is some impending
event which may cause data loss.

I sometimes type sync at a shell when I hear thunder, in case of an
imminent power loss.  Whether this actually helps is questionable.

Putting sync into a script is most likely not useful, unless the script
is part of a full operating system shutdown or something.  Ask your
friendly neighborhood OS experts for advice if you think you're in a
situation where data loss is possible.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]