[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mv: Moving directories to "themselves" (not the bug with incorrect error
From: |
Michal Wencl |
Subject: |
mv: Moving directories to "themselves" (not the bug with incorrect error message) |
Date: |
Sun, 18 Nov 2007 11:16:10 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071022) |
Hi.
I'm not sure if this is a bug, feature, todo, or a change request
but I think the current behaviour is not expected for most people.
At least not for those coming from Windows.
My scenario:
mkdir -p a b/a
touch a/1 a/2 b/a/2
move a b
Current result:
In my version of mv (5.97) the following error message is returned:
mv: cannot move `a' to a subdirectory of itself, `b/a'
I know it was changed to a more meaningful message in later version
but this is not the problem.
Expected result:
Directory a is fully moved to directory b/a, thus b/a contains files
1 and 2 where b/a/2 was overwritten witch a/2.
Moreover, this is how mv works if b/a doesn't exist yet. It creates
b/a and moves a/* inside.
Could you think about it, please? It would be great if at least a
switch for it was added to mv (and other coreutils).
Thanks,
Michal Wencl
- mv: Moving directories to "themselves" (not the bug with incorrect error message),
Michal Wencl <=