GNU bug report logs - #30907
mv return value.

Previous Next

Package: coreutils;

Reported by: Jorgen Harmse <Jorgen.Harmse <at> samsclub.com>

Date: Thu, 22 Mar 2018 17:20:01 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 30907 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jorgen Harmse <Jorgen.Harmse <at> samsclub.com>
Cc: 30907 <at> debbugs.gnu.org
Subject: Re: bug#30907: mv return value.
Date: Thu, 22 Mar 2018 14:53:51 -0700
On 03/22/2018 12:17 PM, Jorgen Harmse wrote:
> My preference is a non-zero exit status when mv does not move/rename the file.

Hmm, this might be doable. POSIX says that the mv exit status is 0 if 
"All input files were moved successfully" and is >0 if "An error 
occurred". With mv -i, if the user declines a move and there is other 
file then neither case applies, so mv can yield either 0 or nonzero as 
an exit status. Of course someone would have to write the code and (more 
importantly) the documentation to do it that way, but I think your 
request is a reasonable one.





This bug report was last modified 6 years and 206 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.