Xref: utzoo comp.unix.wizards:11223 comp.bugs.4bsd:996
Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!munnari!otc!metro!pta!teti!nswitgould!ausonics!greyham
From: greyham@ausonics.OZ (Greyham Stoney)
Newsgroups: comp.unix.wizards,comp.bugs.4bsd
Subject: directory copying with cp; broken?
Keywords: cp directory broken 4.2 bsd strange!
Message-ID: <35@ausonics.OZ>
Date: 16 Sep 88 02:48:10 GMT
Organization: Ausonics Pty Ltd, Sydney, Australia
Lines: 22

No doubt people have noticed this before, but to my way of thinking [and this
may well be the problem :-] cp on our BSD 4.2 system seems to be braindamaged.

When both the source and destination are directories, and the -r option is not
specified, the destination directory is left with a *file* by the name of the
source directory. Much the same as if
	cp sourcedir destdir
was really doing:
	cat sourcedir > destdir/sourcedir

I would have though cp intelligent enough to realise that source and dest were
directorys, and either do what the -r option does (so why do we need it?) or
just reject the copy. (depending on how you view these types of things)
Which ever solution, surely changing a directory into a regular file is a bit
inconsistent?.

		greyham@ausonics.oz
-- 
# Greyham Stoney:      (disclaimer not necessary: I'm obviously irresponsible)
# greyham@ausonics.oz - Ausonics Pty Ltd, Lane Cove. | greyham@utscsd.oz -
# ^^^^^^^       (Official Sponsor of this message.)  | Uni of Technology, Syd.
# [.signature changed to celebrate NEW LOGNAME!! ]   | Good Time City!!!