Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Dec 2003 21:50:44 -0500
From:      Tom McLaughlin <tmclaugh@sdf.lonestar.org>
To:        Lowell Gilbert <freebsd-questions-local@be-well.no-ip.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: minor `cp -R` question
Message-ID:  <1072493444.259.47.camel@compass>
In-Reply-To: <44zndhabyx.fsf@be-well.ilk.org>
References:  <1072232103.93831.19.camel@compass> <44zndhabyx.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2003-12-24 at 21:05, Lowell Gilbert wrote:
> Tom McLaughlin <tmclaugh@sdf.lonestar.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1072493444.259.47.camel>