Bug 174253 - Weird behaviour with mv and directories
Summary: Weird behaviour with mv and directories
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
: 178717 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-26 15:56 UTC by Ralf Ertzinger
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-12-02 16:08:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ralf Ertzinger 2005-11-26 15:56:08 UTC
Description of problem:
Assume a "mv a b/" where a is a directory and b does not exist. Every UNIX I
have used so far (including every RedHat release up to FC4) treats this as a
rename of a to b (equivalent to "mv a b"). Recent FC devel releases throw an error:

[sun@lain ~/temp (0) 49]$ mkdir a
[sun@lain ~/temp (0) 50]$ ls -ld b
ls: b: No such file or directory
[sun@lain ~/temp (2) 51]$ mv a b/
mv: target `b/' is not a directory: No such file or directory
[sun@lain ~/temp (1) 52]$ mv a b
[sun@lain ~/temp (0) 53]$ 

While there is some justification for the new behaviour I think we should keep
the old one, if just for the reason that it has been always that way.

Version-Release number of selected component (if applicable):
coreutils-5.93-4

How reproducible:
always

Steps to Reproduce:
1. Do a "mv a b/" where a is a dir and b does not exist
2.
3.
  
Actual results:
mv complains that b does not exist

Expected results:
rename of a to b (like "mv a b")

Additional info:

Comment 2 Tim Waugh 2005-12-02 16:08:34 UTC
Upstream discussion:
  http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00284.html
  http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00000.html

This isn't a straightforward thing.  Leaving to upstream to decide.

Comment 3 Tim Waugh 2006-01-24 09:23:21 UTC
*** Bug 178717 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.