From owner-freebsd-questions@freebsd.org Mon Oct 17 16:15:45 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70D74C15313 for ; Mon, 17 Oct 2016 16:15:45 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C60243EB for ; Mon, 17 Oct 2016 16:15:44 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from becker.bs.l ([85.180.6.183]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0MbK2G-1cCanN3sto-00ImiV for ; Mon, 17 Oct 2016 18:02:42 +0200 Received: from bsch by becker.bs.l with local (Exim 4.87 (FreeBSD)) (envelope-from ) id 1bwAN7-000IpD-9Y for freebsd-questions@freebsd.org; Mon, 17 Oct 2016 18:02:41 +0200 Date: Mon, 17 Oct 2016 18:02:41 +0200 From: Bertram Scharpf To: freebsd-questions@freebsd.org Subject: Re: A request for cp flag Message-ID: <20161017160241.GA72104@becker.bs.l> Mail-Followup-To: freebsd-questions@freebsd.org References: <122eea3e-08a6-69a0-d67f-93873df095a6@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <122eea3e-08a6-69a0-d67f-93873df095a6@FreeBSD.org> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: Bertram Scharpf X-Provags-ID: V03:K0:jKFOd/eGwXAPWPLIr1nX8N5Hy0I2Oj8ci9ND3TCqL+a0u3vj4yk eUMxoFNc26+mFeco+az4SN6yyHylQJMo69AgzcDv2FGrS7cHsH6mre1CoU8Fh4gbDrE/Zv1 goKB+Tj21CQ4c5Nr4q5dFNkhbArEjlnI+nsowTOStLEw6zVsfMz/YPuMGpGDNk1AH2pyV4H JkWMRxr8uRX8hoZHaElrw== X-UI-Out-Filterresults: notjunk:1;V01:K0:px+X7HQXIzU=:boT3NMinmxFT9nagKzJNPM wFQUe2B6uORPnfYy5BpTxa6r0qkUltaNq7O/s0YhKoeZEL+y7xZp2fTLjpUGgXqqi7kDKvh43 5E/3idBigY0wBygkgmJiRaMdlV6/ClaIVCy0Uu179DQ9qYZWeGCTi0QLRX3F26R7U76CHrpM2 gNXxhBfgcJ+bzRh0WilRrY4bOgjKtRVlFVggQfptO2t60FWcWtIg059VmWlQUUsnVLPFOPdjk ktUptkuZye+GQOEkINEwr46xIvL7NY95Sl+lo09ZrGnJG18VuVjJ3rbS8paWId/9aUGLj+sYL lA9duffMaOZGiRUttpUn9j9qlb/U9LwKQ9ZB1IK/DN8vg7TWMDkqWe0lDxzQnda7WBBBm5rll tgrmKzvFoqncJbsG5wTzrZumnL1KnbdWlBCeh8Utdyx8NLpmVFqC3zy3oZT8uq1H0jpd8HjLQ Z1fggDYriBiowKSPbCIUkadwimdwBSnO76F8XP8GCL1FXlEvt06RyB1GYbeauZK6kakcx9yW0 XW5QiGw7qrPiQ1BK2FIYGYumwtLBoyjSQjxP9Cvekos+dibxvepvUdlgVmgSWlRgL9cynZ8oj F5oHzn0DWdoPI9dsfbZ/k47xyQxg0WoZ7ggdf0+jESAbVgJXGFUOHZMNBY08WKdrlPHPF9jX0 UB1j8zGG0KZH2xSSBieP7wq+1bAaE1KN/ZWjGuNX6TZwd8GVJdnf9KCpCinaHkKTufck= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2016 16:15:45 -0000 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