2 ms·
That must be ancient history, because even Unix V6' mv would copy-delete (it didn't support moving directories to different parts of the tree though; that would
by userbinator 12y ago
That must be ancient history, because even Unix V6' mv would copy-delete (it didn't support moving directories to different parts of the tree though; that would be introduced in V7.)
http://man.cat-v.org/unix-6th/1/mv http://man.cat-v.org/unix-6th/1/mv
http://cm.bell-labs.com/7thEdMan/v7vol1.pdf http://cm.bell-labs.com/7thEdMan/v7vol1.pdf
http://man.cat-v.org/unix_8th/1/mv http://man.cat-v.org/unix_8th/1/mv
- LukeShu 12y agoI just did some digging. You're right that copying to different filesystems was introduced in Research UNIX. In V5 and V6 mv, they actually call `execl("/bin/cp"` to do the copy! Note that neither V5 nor V6 do this for directories though, only regular files (which I guess is implied by the fact that they force the parent directory to be the same for directory moves). I can't find the source or binaries of V3 mv, but the V3 manual does not mention copying (the text in the V6 manual originated in the V4 manual). Edit: more: V7 gained support for moving a directory within the same device, but it still didn't support copying directories across devices. I can't find much on Research UNIX >= V8, but they were based on BSD. Edit: even more: Copying directories in mv was first added to BSD in 1989 by Ken Smith <kensmith@cs.buffalo.edu> (committed by Keith Bostic). It used `cp -R` to do the recursive copies.