Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 3520 - mv will copy a directory into itself in certain situations
Summary: mv will copy a directory into itself in certain situations
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: fileutils
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-06-17 05:03 UTC by alborchers
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-09-25 03:04:39 UTC


Attachments (Terms of Use)

Description alborchers 1999-06-17 05:03:30 UTC
"mv * newdir" creates newdir/newdir and copies files twice.
Recursion stops after one level (thankfully) and only the
files, not subdirectories are copied into newdir/newdir.

This only happens if there are other subdirectories that are
being moved; for example, in the following script, there is
no problem if the subdirectory "dir" is not present.

   Example script:
[test] ls
[test] > file1
[test] mkdir dir newdir
[test] mv * newdir
mv: newdir/newdir/dir: won't create hard link `newdir/dir'
to directory `(null)'
[test] ls -R
.:
newdir

newdir:
dir  file1  newdir

newdir/dir:

newdir/newdir:
file1

Comment 1 Jeff Johnson 1999-06-17 15:29:59 UTC
I'm changing component to fileutils.

Comment 2 Bill Nottingham 1999-09-25 03:04:59 UTC
Should be fixed in the latest fileutils in Raw Hide.


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