From owner-freebsd-questions@FreeBSD.ORG Fri Dec 26 18:49:12 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30D8C16A4CE for ; Fri, 26 Dec 2003 18:49:12 -0800 (PST) Received: from straycat.dhs.org (h0050da134090.ne.client2.attbi.com [65.96.131.3]) by mx1.FreeBSD.org (Postfix) with SMTP id 6537C43D3F for ; Fri, 26 Dec 2003 18:49:10 -0800 (PST) (envelope-from tmclaugh@sdf.lonestar.org) Received: (qmail 25299 invoked from network); 27 Dec 2003 02:49:47 -0000 Received: from unknown (HELO ?192.168.1.128?) (192.168.1.128) by 192.168.1.129 with SMTP; 27 Dec 2003 02:49:47 -0000 From: Tom McLaughlin To: Lowell Gilbert In-Reply-To: <44zndhabyx.fsf@be-well.ilk.org> References: <1072232103.93831.19.camel@compass> <44zndhabyx.fsf@be-well.ilk.org> Content-Type: text/plain Message-Id: <1072493444.259.47.camel@compass> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 26 Dec 2003 21:50:44 -0500 Content-Transfer-Encoding: 7bit cc: FreeBSD Questions Subject: Re: minor `cp -R` question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2003 02:49:12 -0000 On Wed, 2003-12-24 at 21:05, Lowell Gilbert wrote: > Tom McLaughlin writes: > > > Hi, I have a quick question about the cp command and recursively copying > > a directory. If I type: > > > > $ cp -R /foo/file/ ~/ > > > > I get in my home directory a file called "file". If I type: > > > > $ cp -R /foo/file ~/ > > > > I get in my home directory a directory called "foo" and a file called > > "file". Can someone explain why the trailing slash cp to behave > > differently? > > > > My user shell is pdksh and the root shell is csh. I have pdksh set to > > use "complete-list" and csh to use "autolist". Is this behavior just > > something unique to FreeBSD? I tried the same on my OpenBSD box and the > > two commands worked the same and created a directory with a file in it. > > I also don't remember these working differently on linux. Do I possibly > > have something setup wrong with my shells? Thanks. > > I can't reproduce this under any shell, including pdksh. > I'm running -STABLE (and have the pdksh port) as of last Sunday. Thanks Lowell. I looked at cvsweb and their have been some changes since 4.9. Tom