Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Bug in mv in Digital Unix 3.x
@ 1996-04-25  4:00 Mark Sirota
  0 siblings, 0 replies; only message in thread
From: Mark Sirota @ 1996-04-25  4:00 UTC (permalink / raw)


I seem to have discovered an annoying bug in /usr/bin/mv, the hard way.

Summary: mv removes files sometimes when it shouldn't.

To recreate:
	% cd /tmp
	% mkdir a
	% touch a/a
	% ls -la a
	-- total 16
	drwxr-xr-x   2 msirota  system      8192 Apr 25 15:51 .
	drwxrwxrwt   4 root     system      8192 Apr 25 15:35 ..
	-rw-r--r--   1 msirota  system         0 Apr 25 15:51 a
	% mv a a
	mv: rename a to a/a: Invalid argument
	% ls -la a
	drwxr-xr-x   2 msirota  system      8192 Apr 25 15:52 ./
	drwxrwxrwt   4 root     system      8192 Apr 25 15:35 ../

In short, if you have a directory and a file within it by the same
name, and move the directory to itself, the file is removed.

I have tried this under Digital Unix 3.x, Ultrix, Solaris 2.5, and
some version of HP/UX.  The only one with the problem is Digital
Unix.

Has anyone else encountered this?  Is this a known bug?  Is there a
patch?

I do intend to submit this right now to Digital, too, but I thought
I'd ask for your experience.
-- 
Mark Sirota, Network Systems Engineer
University of Pennsylvania, Data Communications and Computing Services
msirota@isc.upenn.edu, 215/573-7214
mv: rename a to a/a: Invalid argument



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-04-25  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-04-25  4:00 Bug in mv in Digital Unix 3.x Mark Sirota

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox