This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Mv after tar in a shell script problems
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 18 May 2005 11:54:08 +0200
- Subject: Re: Mv after tar in a shell script problems
- References: <428B0B51.CB8FB8A@dessent.net>
- Reply-to: cygwin at cygwin dot com
On May 18 02:30, Brian Dessent wrote:
> "Gary R. Van Sickle" wrote:
>
> > ...and, if I change the mv to a loop which keeps trying if there's a
> > failure:
> >
> > while ! mv dir_name_file.tar.bz2_untars_to new_dir_name; do echo "retrying
> > move..."; done
> >
> > it will eventually work after a few iterations.
> >
> > I... huh?
> >
> > I'll brew up a test case, this is nutso.
>
> The only thing I can think of is that tar exits immediately after
> issuing the final write() of the last file, and mv starts up before the
> file system has a chance to finish commiting that write to disk.
Sounds not convincing. If the OS isn't able to deal with such a basic
situation, it's seriously unusable. Windows might have some annoying
properties, but it's certainly usable.
I'm just running a script which desperatly tries to reproduce the above
problem, but it WJFFM:
#!/bin/sh
while true
do
tar xvjf foo.tar.bz2
mv foo.dir bar.dir
rm bar.dir
done
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader mailto:cygwin@cygwin.com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/