--- Begin Message ---
Subject: |
mu -v output ordering looks impossible |
Date: |
Thu, 18 May 2017 04:19:42 +0800 |
I do
mv -v /home/jidanni/jidanni.org/location/grow/programs /tmp
and see
'/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs'
'/home/jidanni/jidanni.org/location/grow/programs/grow.tgz' ->
'/tmp/programs/grow.tgz'
removed '/home/jidanni/jidanni.org/location/grow/programs/grow.tgz'
removed directory '/home/jidanni/jidanni.org/location/grow/programs'
but isn't that a rather impossible sequence? At least the first two?
Well I don't know the best way to write it.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#26971: mv -v output ordering looks impossible |
Date: |
Thu, 18 May 2017 02:11:55 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 17/05/17 22:46, 積丹尼 Dan Jacobson wrote:
> PB> So this is working across file systems
> Yes.
>>> '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs'
> This says to me "I, the mv command, have just moved A to B.
>
> PB> create dir /tmp/programs
> If that (create B) is what it is doing in that step, then it should not
> mention the unrelated A.
>
>>> '/home/jidanni/jidanni.org/location/grow/programs/grow.tgz' ->
>>> '/tmp/programs/grow.tgz'
> This says to me "I am moving A/C to B/C". But there is no more A... at
> least that is what the user thinks... so how could it still move it.
>
>
> PB> I suppose we could distinguish the creation operations, though
> PB> note if the first attempted rename() worked for the source dir,
> PB> then there would have been just a single operation output like:
>
> PB> '/home/jidanni/jidanni.org/location/grow/programs' -> '/tmp/programs'
>
> Well all I know is if the user always can do something on one line, then he
> would expect a consistent number of -v output lines.
Well I'm not sure about having a consistent number of output lines,
but I do see that the output can be confusing. The attached patch
distinguishes the different operations for mv, as follows:
$ mkdir /tmp/mv-test && touch /tmp/mv-test/file
$ src/mv -v /tmp/mv-test .
created directory './mv-test'
copied '/tmp/mv-test/file' -> './mv-test/file'
removed '/tmp/mv-test/file'
removed directory '/tmp/mv-test'
$ src/mv -v mv-test mv-test-2
renamed 'mv-test' -> 'mv-test-2'
$ src/mv -v mv-test-2/file mv-test-2/file2
renamed 'mv-test-2/file' -> 'mv-test-2/file2'
cheers,
Pádraig
mv-v-explicit.patch
Description: Text Data
--- End Message ---