Message-Id: <200505180914.j4I9EWQD028176@delorie.com> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Gary R. Van Sickle" To: Subject: RE: Mv after tar in a shell script problems Date: Wed, 18 May 2005 04:17:32 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: X-IsSubscribed: yes > Am I losing my mind, or shouldn't this "just work"(tm) in a > shell script?: > > #!/bin/sh > # ^^ behaves the same if it's /bin/bash > > tar xvjf file.tar.bz2 > mv dir_name_file.tar.bz2_untars_to new_dir_name > > ??? > > About half the time I get "Permission denied" from mv, the > other half it works fine. If I do it by hand, even after a > "Permission denied", it works fine. This is with both the > current DLL snapshot and 1.5.16-1, current coreutils. I must > be missing something pretty basic here, because configures > etc are working fine. > ...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. -- Gary R. Van Sickle -- 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/