GNU bug report logs - #5926
feature request: mv -p to create missing target dir

Previous Next

Package: coreutils;

Reported by: Rodolfo Borges <rodolfo.borges <at> gmail.com>

Date: Sun, 11 Apr 2010 14:10:02 UTC

Severity: wishlist

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


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

From: f0rhum <at> free.fr
To: 5926 <at> debbugs.gnu.org
Subject: Re: bug#5926: feature request: mv -p to create missing target dir
Date: Mon, 20 Oct 2014 13:20:03 +0200 (CEST)
> The mv command causes an atomic rename(2) to occur if on the same file
> system.  That is not possible when using cp + rm.  Therefore mv is
> required.
Hi Bob.
I am just trying to understand why this very request is refused with
the argument "small is beautiful", when the "-p" was accepted for cp:
I mean why wasn't refused "cp -p" request, saying "just use mkdir first".
This seems unfair for mv to be refused the ease of use cp was offered.
Maybe I have a problem with understanding this "atomic" word
which also stunned myself in iptables documentation. 

> If mv'ing a file from one file system to another it is impossible to
> have an atomic rename().  In that case mv falls back to effectively cp
> plus rm.  That is mentioned in the mv documentation.
The same "You have to know if the parent exists" argument that was opposed
to this request could have also been opposed: "You have to know if you are
moving in the same file system or an other,
so we stick to rename+cp+rm, no need for mv at all, small is beautiful,
do one thing and do it well".

That's not to argue. Just coming to GNU since 6 years from closed source
OSes where nobody wouldn't even have the idea to ask why this-and-that, I
realize here I can ask why, e.g. why we haven't some kind of uniformity in
commands parameters --long and -short for various commands. This would be
a great help for average users. Somebody once replied to me "it is because
many different people work(ed) on these commands, at different time...". Just
a pure fact we have to live with. Is it the same inside the coreutils 
team too?

Bye bye

Fabrice




This bug report was last modified 10 years and 218 days ago.

Previous Next


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