Date: Mon, 17 Oct 2016 18:02:41 +0200 From: Bertram Scharpf <lists@bertram-scharpf.de> To: freebsd-questions@freebsd.org Subject: Re: A request for cp flag Message-ID: <20161017160241.GA72104@becker.bs.l> In-Reply-To: <122eea3e-08a6-69a0-d67f-93873df095a6@FreeBSD.org> References: <VI1PR02MB0974F08FABD625DE9C2472B8F6D00@VI1PR02MB0974.eurprd02.prod.outlook.com> <122eea3e-08a6-69a0-d67f-93873df095a6@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 17. Oct 2016, 15:59:10 +0100, Matthew Seaman wrote: > On 2016/10/17 15:50, Manish Jain wrote: > > I occasionally face a problem while copying contents with cp. The -R > > flag of cp takes the source name as this : If the source_file ends in a > > /, the contents of the directory are copied rather than the directory > > itself. > > > > Could it considered a valid request that an extra flag (perhaps -r) be > > implemented that does the reverse : copy out src rather than src/* ? > > You're not going to get anyone to change the behaviour of a core command > like cp(1) I'm afraid. For all that you dislike the behaviour when > copying a directory path that ends in '/' there will be many, many more > people that have written scripts that depend on that exact behaviour and > will be exceedingly peeved if those scripts stop working. Further there are many other programs that behave the same way (e. g. rsync here). Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161017160241.GA72104>