rename strangeness, a possible bug
Guy Harris
guy at auspex.auspex.com
Sun Aug 27 08:40:41 AEST 1989
>One of them is what happens when you move a directory to a
>sub-directory of itself. Consider the following:
>
> directory structure: /a/dir1/dir2/dir3/dir4/dir5
>
> command: mv /a/dir1 /a/dir1/dir2
>
> command: (in /a/dir1/dir2) mv .. dir3k
Script started on Sat Aug 26 15:38:07 1989
auspex% cat /etc/motd
SunOS Release 4.0 (AUSPEX) #1: Thu Jun 1 06:56:44 PDT 1989
auspex% mv /tmp/dir1 /tmp/dir1/dir2
mv: /tmp/dir1: rename: Invalid argument
auspex% cd /tmp/dir1/dir2
auspex% mv .. dir3k
mv: ..: rename: Invalid argument
auspex% ^D
script done on Sat Aug 26 15:38:22 1989
SunOS and, I think, other systems that have picked "rename" up from
4.xBSD, won't let you do such a move. They will let you do other "safe"
moves, though.
More information about the Comp.unix.wizards
mailing list