From owner-freebsd-questions@FreeBSD.ORG Wed Dec 24 18:05:28 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 BA75616A4CE for ; Wed, 24 Dec 2003 18:05:28 -0800 (PST) Received: from be-well.no-ip.com (lowellg.ne.client2.attbi.com [66.30.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AD2443D46 for ; Wed, 24 Dec 2003 18:05:27 -0800 (PST) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.no-ip.com (Postfix, from userid 1147) id C193166; Wed, 24 Dec 2003 21:05:26 -0500 (EST) Sender: lowell@be-well.ilk.org To: Tom McLaughlin References: <1072232103.93831.19.camel@compass> From: Lowell Gilbert Date: 24 Dec 2003 21:05:26 -0500 In-Reply-To: <1072232103.93831.19.camel@compass> Message-ID: <44zndhabyx.fsf@be-well.ilk.org> Lines: 29 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Thu, 25 Dec 2003 02:05:28 -0000 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. -- Lowell Gilbert, embedded/networking software engineer, Boston area: resume/CV at http://be-well.ilk.org:8088/~lowell/resume/ username/password "public"