bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#389432: mv: cannot move directory into an already populated dire


From: Martin Waitz
Subject: Re: Bug#389432: mv: cannot move directory into an already populated directory
Date: Tue, 26 Sep 2006 08:23:54 +0200
User-agent: Mutt/1.5.9i

hoi :)

thank you very much for the quick answer.

On Mon, Sep 25, 2006 at 11:51:38PM +0200, Jim Meyering wrote:
> Thanks for the report, but mv can't do that -- at least not by default.
> mv works mainly by making the "rename" syscall.  In some unusual cases
> (like when src and dest are hard links), it can get away with just
> unlinking the source file.  However, rename fails when the destination
> is a nonempty directory, as in your example above.
> 
> True, that diagnostic is misleading, and the newer coreutils-6.2
> gives a more useful message:
> 
>     $ mkdir -p 1/a/b 2/a/c
>     $ mv 1/a 2/
>     mv: cannot move `1/a' to `2/a': Directory not empty
>     [Exit 1]

This is much more helpful.

> A stable coreutils-6.3 should be available soon.

Great, thanks!

> It might make sense to add an option to make mv work this way,
> if you can make a good enough case for it.

When you move a big tree to another filesystem and this move gets
interrupted then it would be nice to be able to continue later by
just issuing the command again.

In my current case I really want to merge two directory structures,
I guess I have to resort to some more shell scripting now.

-- 
Martin Waitz

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]