Bug 3520 - mv will copy a directory into itself in certain situations
mv will copy a directory into itself in certain situations
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-06-17 01:03 EDT by alborchers
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-09-24 23:04:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description alborchers 1999-06-17 01:03:30 EDT
"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 11:29:59 EDT
I'm changing component to fileutils.
Comment 2 Bill Nottingham 1999-09-24 23:04:59 EDT
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.