From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 11 10:09:20 2010 Received: (at submit) by debbugs.gnu.org; 11 Apr 2010 14:09:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0xqi-0003lO-Fx for submit@debbugs.gnu.org; Sun, 11 Apr 2010 10:09:20 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0xp5-0003kO-Ms for submit@debbugs.gnu.org; Sun, 11 Apr 2010 10:07:40 -0400 Received: from lists.gnu.org ([199.232.76.165]:49582) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O0xp0-0007pV-Jh for submit@debbugs.gnu.org; Sun, 11 Apr 2010 10:07:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0xp0-0004bo-95 for bug-coreutils@gnu.org; Sun, 11 Apr 2010 10:07:34 -0400 Received: from [140.186.70.92] (port=43031 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0xox-0004ba-Sv for bug-coreutils@gnu.org; Sun, 11 Apr 2010 10:07:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0xow-0008Cx-Cw for bug-coreutils@gnu.org; Sun, 11 Apr 2010 10:07:31 -0400 Received: from mail-yx0-f203.google.com ([209.85.210.203]:47062) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0xow-0008Ci-9x for bug-coreutils@gnu.org; Sun, 11 Apr 2010 10:07:30 -0400 Received: by yxe41 with SMTP id 41so5952646yxe.14 for ; Sun, 11 Apr 2010 07:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:received :message-id:subject:to:content-type; bh=q6gfQXVdf40GoiBX9Kkt8/sasyvVb636XYekaVYAtMk=; b=ENWPJ1TjA3pD+XPev+W4h++LCg0mrqDdOltkkFOXy5oeIpt+4MEgfeaPbtJcQAXvEx ntrjU5BtAYrxkq3df80nhHu7+mPN2K+39pYjP7pgorEWvUI10CMd0ZKnL9jKAHTAFj3W bBvIzTDiiUeF9/DVLQ8C7UUmL2UhUdlfuek4A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=OdcaJWTZK02XOS6m0sbZf0nZyuyowG8zpiWECW7EE+gCJooTpzsQz7roJn/Fd4V3F5 10RRp/cwJuDEpxD/CYD6AbFO6Xr5c/00VY+S/0MeMpZ5mqXIYAo/dLNfWwoC7X4DP81p JxkQwyL0fXkogqgAaiTJOCLSALrOM9hzMEQTY= MIME-Version: 1.0 Received: by 10.151.78.11 with HTTP; Sun, 11 Apr 2010 07:07:09 -0700 (PDT) From: Rodolfo Borges Date: Sun, 11 Apr 2010 11:07:09 -0300 Received: by 10.150.176.16 with SMTP id y16mr2696388ybe.169.1270994849338; Sun, 11 Apr 2010 07:07:29 -0700 (PDT) Message-ID: Subject: feature request: mv -p to create missing target dir To: bug-coreutils@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 11 Apr 2010 10:09:19 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) $ mv foo ~/some/path/ mv: cannot create regular file `/home/bart9h/some/path/': Is a directory $ mkdir -p ~/some/path/ $ mv foo ~/some/path/ $ :( bash: syntax error near unexpected token `newline' $ $ $ pacman -Sy coreutils (... upgrades package ...) $ $ $ mv -vp foo ~/some/path/ mv: created directory `/home/bart9h/some' mv: created directory `/home/bart9h/some/path/' `foo' -> `/home/bart9h/some/path/foo' $ alias mv='mv -p' $ :) bash: syntax error near unexpected token `)' $ From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 15 19:13:48 2010 Received: (at 5926) by debbugs.gnu.org; 15 Apr 2010 23:13:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2YFn-0000Uy-Ro for submit@debbugs.gnu.org; Thu, 15 Apr 2010 19:13:48 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2YFl-0000Us-M3 for 5926@debbugs.gnu.org; Thu, 15 Apr 2010 19:13:46 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id 3F681213A2; Thu, 15 Apr 2010 17:13:41 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 359363CC3A0; Thu, 15 Apr 2010 17:13:41 -0600 (MDT) Date: Thu, 15 Apr 2010 17:13:41 -0600 From: Bob Proulx To: Rodolfo Borges Subject: Re: bug#5926: feature request: mv -p to create missing target dir Message-ID: <20100415231341.GA29775@dementia.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 5926 Cc: 5926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Rodolfo Borges wrote: > $ mv foo ~/some/path/ > mv: cannot create regular file `/home/bart9h/some/path/': Is a directory No target directory exists. > $ mkdir -p ~/some/path/ > $ mv foo ~/some/path/ That seems like the best way to do it. > $ :( > bash: syntax error near unexpected token `newline' > ... > $ :) > bash: syntax error near unexpected token `)' Using this format to tell us what you are thinking is very confusing! > $ mv -vp foo ~/some/path/ > mv: created directory `/home/bart9h/some' > mv: created directory `/home/bart9h/some/path/' > `foo' -> `/home/bart9h/some/path/foo' I don't think this is a good idea. It could be added. But does it really gain you anything over calling mkdir -p? I don't think so. It would simply add code bloat to the program. Plus it wouldn't be portable. Other implementations wouldn't have it. It is only of marginal benefit if at all and so other implementations might never have it. In any case you would need to wait years before the feature trickled down to where you could use it reliably. Also you can always accomplish this yourself with a shell script. In general things that can be easily encapsulated in a shell script are not good additions to the utilities. Adding that option is counter to The Unix Philosophy. Small is beautiful. Make each program do one thing well. Choose portability over efficiency. Use shell scripts to increase leverage and portability. Bob From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 16 08:13:41 2010 Received: (at 5926) by debbugs.gnu.org; 16 Apr 2010 12:13:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2kQX-0007Fr-Ds for submit@debbugs.gnu.org; Fri, 16 Apr 2010 08:13:41 -0400 Received: from mail-yx0-f185.google.com ([209.85.210.185]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2jlR-0006sX-Dc for 5926@debbugs.gnu.org; Fri, 16 Apr 2010 07:31:13 -0400 Received: by yxe15 with SMTP id 15so1274376yxe.7 for <5926@debbugs.gnu.org>; Fri, 16 Apr 2010 04:31:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=PmQHP6FdnL/bbZ64N4Y7JJdLW1Vu979PqrqFInA225k=; b=wl0Egqu8QiDkXH4/ftEAKCjTmV0qM+OZDIe1Ea/jWiS3EbPzD4nZyxx0A0o3jFmG/6 zS2c7N+nQB9C0b/pGnJFc0rJAO1f2PvC1l/eA8gDz2ernS19/BEIv9ZFtFpArXZeiE2M vvQzRB5FhPTBhG0bKV/39kcWI05RjhtqBKOd4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=o+4JZ8xb2bvdFB4/FqONxLL9bZSfVigzmA7cWGzYILXd9qN1++qjudUk8LHwZB1j09 TwYjIKiS3JvScPszYpuKzxhhkunR60RV2qD4UbMy5sMwQtTFeUuOV7T6i5bFflkQkR1w tbCpLjkTYD2ZRSMnezayI8wMWm4nqCqjKHfmI= MIME-Version: 1.0 Received: by 10.150.177.20 with HTTP; Fri, 16 Apr 2010 04:30:47 -0700 (PDT) In-Reply-To: <20100415231341.GA29775@dementia.proulx.com> References: <20100415231341.GA29775@dementia.proulx.com> From: Rodolfo Borges Date: Fri, 16 Apr 2010 08:30:47 -0300 Received: by 10.150.62.5 with SMTP id k5mr1881150yba.18.1271417467120; Fri, 16 Apr 2010 04:31:07 -0700 (PDT) Message-ID: Subject: Re: bug#5926: feature request: mv -p to create missing target dir To: Bob Proulx Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 5926 X-Mailman-Approved-At: Fri, 16 Apr 2010 08:13:37 -0400 Cc: 5926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.7 (---) On Thu, Apr 15, 2010 at 8:13 PM, Bob Proulx wrote: > Rodolfo Borges wrote: >> $ mv foo ~/some/path/ >> mv: cannot create regular file `/home/bart9h/some/path/': Is a directory > > No target directory exists. > >> $ mkdir -p ~/some/path/ >> $ mv foo ~/some/path/ > > That seems like the best way to do it. > >> $ :( >> bash: syntax error near unexpected token `newline' >> ... >> $ :) >> bash: syntax error near unexpected token `)' > > Using this format to tell us what you are thinking is very confusing! > It seems you haven't got the writing style. I know the cause of the error in the first `mv` and, sheesh!, I frigging know bash doesn't understand emoticons. Better to fallback to plain boring English, then. >> $ mv -vp foo ~/some/path/ >> mv: created directory `/home/bart9h/some' >> mv: created directory `/home/bart9h/some/path/' >> `foo' -> `/home/bart9h/some/path/foo' > > I don't think this is a good idea. =A0It could be added. =A0But does it > really gain you anything over calling mkdir -p? > I don't think so. > It would simply add code bloat to the program. You don't have to type the path twice, and more importantly, you don't have to know beforehand that the path doesn't exist yet. The use case if fairly common: you start typing `mv my-first-salsa-album/ ~/music/sal` ops!, I have no salsa subdir yet in my music collection: I have to cancel the command, create the directory, then type it again. > Plus it wouldn't be portable. =A0Other implementations wouldn't have it. > It is only of marginal benefit if at all and so other implementations > might never have it. =A0In any case you would need to wait years before > the feature trickled down to where you could use it reliably. The GNU utilities already have a bunch of features that other implementations don't have. > Also you can always accomplish this yourself with a shell script. =A0In > general things that can be easily encapsulated in a shell script are > not good additions to the utilities. cat <> ~/.bashrc function mv() { local target=3D"${!#}" local dir if [[ "$target" =3D~ '/$' ]]; then dir=3D"$target" else dir=3D"$(dirname "$target")" fi test -d "$dir" || mkdir -vp "$dir" $(which mv) "$@" } EOF > Adding that option is counter to The Unix Philosophy. =A0Small is > beautiful. =A0Make each program do one thing well. =A0Choose portability > over efficiency. =A0Use shell scripts to increase leverage and > portability. `cp` does create directories, shouldn't it restrict itself to copying files then? From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 24 16:08:08 2010 Received: (at 5926-done) by debbugs.gnu.org; 24 Apr 2010 20:08:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5le3-0002xP-P6 for submit@debbugs.gnu.org; Sat, 24 Apr 2010 16:08:08 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5le1-0002x3-8q for 5926-done@debbugs.gnu.org; Sat, 24 Apr 2010 16:08:06 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id 2415C21363; Sat, 24 Apr 2010 14:08:03 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 1B3453CC3A0; Sat, 24 Apr 2010 14:08:03 -0600 (MDT) Date: Sat, 24 Apr 2010 14:08:03 -0600 From: Bob Proulx To: Rodolfo Borges Subject: Re: bug#5926: feature request: mv -p to create missing target dir Message-ID: <20100424200803.GA1138@dementia.proulx.com> References: <20100415231341.GA29775@dementia.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 5926-done Cc: 5926-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Rodolfo Borges wrote: > Bob Proulx wrote: > > Rodolfo Borges wrote: > >> $ :( > >> bash: syntax error near unexpected token `newline' > >> ... > >> $ :) > >> bash: syntax error near unexpected token `)' > > > > Using this format to tell us what you are thinking is very confusing! > > It seems you haven't got the writing style. No. When reading through reported bugs one is naturally looking for error messages. By including error messages in your report that are unrelated to the topic you are reporting it actively distracts from it. It makes the job of reading your report much harder. > I know the cause of the error in the first `mv` and, sheesh!, I > frigging know bash doesn't understand emoticons. Including smileys or frownies is just fine. It was only the bash error message that you included along with them that I found difficult. > Better to fallback to plain boring English, then. Please do. Thank you. > >> $ mv -vp foo ~/some/path/ > >> mv: created directory `/home/bart9h/some' > >> mv: created directory `/home/bart9h/some/path/' > >> `foo' -> `/home/bart9h/some/path/foo' > > > > I don't think this is a good idea. It could be added. But does it > > really gain you anything over calling mkdir -p? > > I don't think so. > > It would simply add code bloat to the program. > > You don't have to type the path twice, and more importantly, you don't True. But the same could be said for any complex command that could be written to do any ten or twenty things all in one command. You want one thing, I want a different thing, ten other people want ten other different things. Creating such complex commands is not a good thing and violates the Unix Philosophy as I explained. > have to know beforehand that the path doesn't exist yet. That is also true of calling 'mkdir -p DIR' on the path beforehand. You don't have to know if it exists or not. > The use case if fairly common: you start typing `mv > my-first-salsa-album/ ~/music/sal` ops!, I have no salsa > subdir yet in my music collection: I have to cancel the command, > create the directory, then type it again. For someone who always used the proposed 'mv -p' option it would mean that a typo would accidentally create a new and differently named directory by mistake. Your typing and spelling would need to be consistent and accurate because the risk from a mistake would be increased. > > Plus it wouldn't be portable. Other implementations wouldn't have it. > > It is only of marginal benefit if at all and so other implementations > > might never have it. In any case you would need to wait years before > > the feature trickled down to where you could use it reliably. > > The GNU utilities already have a bunch of features that other > implementations don't have. True. > > Also you can always accomplish this yourself with a shell script. In > > general things that can be easily encapsulated in a shell script are > > not good additions to the utilities. > > cat <> ~/.bashrc > function mv() { > local target="${!#}" > local dir > if [[ "$target" =~ '/$' ]]; then > dir="$target" > else > dir="$(dirname "$target")" > fi > test -d "$dir" || mkdir -vp "$dir" > $(which mv) "$@" > } > EOF Very good! I see that you have a solution to your problem. As a side comment I don't see the point of: > $(which mv) "$@" The 'which' command is another one of those simple but not very portable commands that does different things on different systems. In the simple case of reporting where the command is found on PATH the use here is redundant since the command would otherwise simply be found on PATH. mv "$@" > > Adding that option is counter to The Unix Philosophy. Small is > > beautiful. Make each program do one thing well. Choose portability > > over efficiency. Use shell scripts to increase leverage and > > portability. > > `cp` does create directories, shouldn't it restrict itself to copying > files then? The -R, -r, --recursive option does copy directories recursively. It is a copy of the input directory hierarchy and therefore cp copies it. But is that the same thing as making arbitrary directories down the destination path? I don't think so. Since you have a simple resolution to your issue by using your small shell script and no one else has joined into the discussion and sufficient time has passed to allow everyone to have read it then I will assume that there isn't any motivation from others to make this change. Therefore I am going to close this bug. It will remain in the archive and will be available for further discussion. If the opinion changes then the issue may be reopened. Bob From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 24 18:57:21 2010 Received: (at 5926) by debbugs.gnu.org; 24 Apr 2010 22:57:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5oHo-0004rO-TI for submit@debbugs.gnu.org; Sat, 24 Apr 2010 18:57:21 -0400 Received: from c-98-226-122-10.hsd1.in.comcast.net ([98.226.122.10] helo=kosh.dhis.org) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1O5oHn-0004rH-4g for 5926@debbugs.gnu.org; Sat, 24 Apr 2010 18:57:19 -0400 Received: (qmail 18929 invoked by uid 1000); 24 Apr 2010 22:57:17 -0000 Message-ID: <20100424225717.18928.qmail@kosh.dhis.org> From: "Alan Curry" Subject: Re: bug#5926: feature request: mv -p to create missing target dir To: bob@proulx.com (Bob Proulx) Date: Sat, 24 Apr 2010 17:57:17 -0500 (GMT+5) In-Reply-To: <20100424200803.GA1138@dementia.proulx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Bob Proulx writes: > > As a side comment I don't see the point of: > > > $(which mv) "$@" > I can guess the point: bash$ alias mv='mv -i' bash$ touch a b bash$ mv a b mv: overwrite `b'? ^C bash$ $(which mv) a b bash$ ls -l a b ls: cannot access a: No such file or directory -rw------- 1 pacman users 0 Apr 24 17:55 b [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.0 FB_WORD1_END_DOLLAR BODY: Looks like a word ending with a $ 0.0 BAYES_50 BODY: Bayesian spam probability is 40 to 60% [score: 0.4966] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS -0.3 AWL AWL: From: address is in the auto white-list X-Debbugs-Envelope-To: 5926 Cc: 5926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Bob Proulx writes: > > As a side comment I don't see the point of: > > > $(which mv) "$@" > I can guess the point: bash$ alias mv='mv -i' bash$ touch a b bash$ mv a b mv: overwrite `b'? ^C bash$ $(which mv) a b bash$ ls -l a b ls: cannot access a: No such file or directory -rw------- 1 pacman users 0 Apr 24 17:55 b [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [98.226.122.10 listed in zen.spamhaus.org] 0.9 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [98.226.122.10 listed in dnsbl.sorbs.net] 0.0 FB_WORD1_END_DOLLAR BODY: Looks like a word ending with a $ -1.1 BAYES_05 BODY: Bayesian spam probability is 1 to 5% [score: 0.0256] 0.1 RDNS_DYNAMIC Delivered to trusted network by host with dynamic-looking rDNS 0.3 AWL AWL: From: address is in the auto white-list Bob Proulx writes: > > As a side comment I don't see the point of: > > > $(which mv) "$@" > I can guess the point: bash$ alias mv='mv -i' bash$ touch a b bash$ mv a b mv: overwrite `b'? ^C bash$ $(which mv) a b bash$ ls -l a b ls: cannot access a: No such file or directory -rw------- 1 pacman users 0 Apr 24 17:55 b Silly aliases. -- Alan Curry From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 24 19:47:40 2010 Received: (at 5926) by debbugs.gnu.org; 24 Apr 2010 23:47:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5p4V-0005Do-Sy for submit@debbugs.gnu.org; Sat, 24 Apr 2010 19:47:40 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O5p4U-0005Da-5X for 5926@debbugs.gnu.org; Sat, 24 Apr 2010 19:47:38 -0400 Received: from dementia.proulx.com (dementia.proulx.com [192.168.230.115]) by joseki.proulx.com (Postfix) with ESMTP id 7A2F921363 for <5926@debbugs.gnu.org>; Sat, 24 Apr 2010 17:47:36 -0600 (MDT) Received: by dementia.proulx.com (Postfix, from userid 1000) id 740BAC3F6B2; Sat, 24 Apr 2010 17:47:36 -0600 (MDT) Date: Sat, 24 Apr 2010 17:47:36 -0600 From: Bob Proulx To: 5926@debbugs.gnu.org Subject: Re: bug#5926: feature request: mv -p to create missing target dir Message-ID: <20100424234736.GA1752@dementia.proulx.com> References: <20100424225717.18928.qmail@kosh.dhis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100424225717.18928.qmail@kosh.dhis.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: -1.8 (-) X-Debbugs-Envelope-To: 5926 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Alan Curry wrote: > Bob Proulx writes: > > As a side comment I don't see the point of: > > > > > $(which mv) "$@" > > I can guess the point: > > bash$ alias mv='mv -i' > bash$ touch a b > bash$ mv a b > mv: overwrite `b'? ^C > bash$ $(which mv) a b Good observation. Yes, but... Using aliases in general scripting? That way leads to madness. In the proposed shell function aliases could be in effect but if that is the case then it would be better to explicitly turn off aliasing for that command. The traditional quoting to avoid aliases: \mv "$@" > Silly aliases. Agreed. Bob From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 25 11:22:02 2010 Received: (at 5926) by debbugs.gnu.org; 25 Apr 2010 15:22:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O63ej-00057N-EQ for submit@debbugs.gnu.org; Sun, 25 Apr 2010 11:22:02 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O61ub-0003Xq-Gk for 5926@debbugs.gnu.org; Sun, 25 Apr 2010 09:30:18 -0400 Received: by wwb24 with SMTP id 24so2914273wwb.3 for <5926@debbugs.gnu.org>; Sun, 25 Apr 2010 06:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:cc:mime-version:content-type :content-transfer-encoding:message-id; bh=83puVN3BT33PGEWQ4cZ6FDORgZPxvDnATGHRJAkljmQ=; b=cpXYQHBGw/jQLKOgZItBk4Moh9MTHnDfIBDKLk/Fkm5HZsw4DRmHRJH7YF0Fe6PyLf 5ao8WNXotZJgHVD8VZmGbdXkF7jTIlZ4cS0CKQ09YUnxxm3lR7+ZIenhRmGWuhUUnWtm ge3fFctVJBaal9TGoJNzhEg8nOyEI4/IR0TGA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:cc :mime-version:content-type:content-transfer-encoding:message-id; b=BHrxjCVJN1LxxQAuw27qLHPTLG100jCzhI/RiGaXAVsSkCq8zqmqSezgw/4PdW2M+8 34jLtKZbNxmi5bsJz3C/N+oZ3tdFPM2rhKbrsBoLsw9k7AdIFqOmF9L4BXEr2WqtrWTo Dicld4zaY6p9NiIRbznFbQWYaWt7tNIGtneHg= Received: by 10.216.164.193 with SMTP id c43mr3089521wel.178.1272202211940; Sun, 25 Apr 2010 06:30:11 -0700 (PDT) Received: from bigio.localnet (host16-33-dynamic.56-82-r.retail.telecomitalia.it [82.56.33.16]) by mx.google.com with ESMTPS id i34sm5171255gve.9.2010.04.25.06.30.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 25 Apr 2010 06:30:10 -0700 (PDT) From: Stefano Lattarini To: 5926@debbugs.gnu.org Subject: Re: bug#5926: feature request: mv -p to create missing target dir Date: Sun, 25 Apr 2010 15:29:34 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) References: <20100424200803.GA1138@dementia.proulx.com> In-Reply-To: <20100424200803.GA1138@dementia.proulx.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201004251529.35918.stefano.lattarini@gmail.com> X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5926 X-Mailman-Approved-At: Sun, 25 Apr 2010 11:22:00 -0400 Cc: Rodolfo Borges , bob@proulx.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Just a few obsevations on side issues... Bob Proulx writes: > Rodolfo Borges wrote: > > > cat <> ~/.bashrc > > function mv() { > > local target="${!#}" > > local dir > > if [[ "$target" =~ '/$' ]]; then > > dir="$target" > > else > > dir="$(dirname "$target")" > > fi > > test -d "$dir" || mkdir -vp "$dir" > > $(which mv) "$@" > > } > > EOF > > Very good! I see that you have a solution to your problem. > > As a side comment I don't see the point of: > > $(which mv) "$@" I think that's needed because otherwise the shell function would end up calling itself recursively, since it's named `mv' too. > The 'which' command is another one of those simple but not very > portable commands that does different things on different systems. Since Rodolfo is assuming bash as his shell, he could have used: $(type -P mv) "$@" instead, which is more "portable" because it just uses bash builtins. > In the simple case of reporting where the command is found on PATH > the use here is redundant since the command would otherwise simply > be found on PATH. > mv "$@" No, this would call the `mv' function, since shell functions take precedence over external commands in bash. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 25 11:22:03 2010 Received: (at 5926) by debbugs.gnu.org; 25 Apr 2010 15:22:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O63ek-00057Q-Kb for submit@debbugs.gnu.org; Sun, 25 Apr 2010 11:22:03 -0400 Received: from mail-gw0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O622X-0003bm-P9 for 5926@debbugs.gnu.org; Sun, 25 Apr 2010 09:38:30 -0400 Received: by gwaa12 with SMTP id a12so2333062gwa.3 for <5926@debbugs.gnu.org>; Sun, 25 Apr 2010 06:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=RrMCzb90f8SZxeDqP8cBP7pLi2uerVI0vkB8GN71E7s=; b=b+NlqZyqsW28FhS3iGUv0WJXkifPTefrQSZqyDYc9KYouM7MB+jCOE2WA7Tsaknq57 mbvLO7OfrVNckg6up18JNReiUl+DGeUar5gbSRMkyaz10Gjd+WI4W8FTcPbccjbbKAcp Z91dXS+slbFEuFONeRWIKDZBfG6plggcc7CBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Qtwl7DeGI9EaT37RPG8RjZlF6F0zGJlfRt8aPvwIL+hyskbADLDrfp6pRo6EQ86UOQ R3zCP7tJY8zjxEUw5VZ5r+gfRr6bA8opxSVTJ4azd8dfho32BT/ldMeg8saTAallUFhH 3s1dF8dfnPid92tFMMxymw7hLSm9dnyFl94WQ= Received: by 10.150.187.10 with SMTP id k10mr2891925ybf.190.1272202704105; Sun, 25 Apr 2010 06:38:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.158.12 with HTTP; Sun, 25 Apr 2010 06:38:04 -0700 (PDT) In-Reply-To: <201004251529.35918.stefano.lattarini@gmail.com> References: <20100424200803.GA1138@dementia.proulx.com> <201004251529.35918.stefano.lattarini@gmail.com> From: Rodolfo Borges Date: Sun, 25 Apr 2010 10:38:04 -0300 Message-ID: Subject: Re: bug#5926: feature request: mv -p to create missing target dir To: Stefano Lattarini Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5926 X-Mailman-Approved-At: Sun, 25 Apr 2010 11:22:00 -0400 Cc: 5926@debbugs.gnu.org, bob@proulx.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Sun, Apr 25, 2010 at 10:29 AM, Stefano Lattarini wrote: > Just a few obsevations on side issues... > >> > =A0 =A0 $(which mv) "$@" > I think that's needed because otherwise the shell function would end > up calling itself recursively, since it's named `mv' too. exactly. >> The 'which' command is another one of those simple but not very >> portable commands that does different things on different systems. > Since Rodolfo is assuming bash as his shell, he could have used: > =A0$(type -P mv) "$@" > instead, which is more "portable" because it just uses bash builtins. thanks, stefano. didn't know about type -P From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 26 05:00:33 2010 Received: (at 5926) by debbugs.gnu.org; 26 Apr 2010 09:00:33 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6KB6-0005Al-RJ for submit@debbugs.gnu.org; Mon, 26 Apr 2010 05:00:33 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6KB4-0005Ae-Rf for 5926@debbugs.gnu.org; Mon, 26 Apr 2010 05:00:31 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id A58311C15590; Mon, 26 Apr 2010 11:00:26 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 69D9690D2F; Mon, 26 Apr 2010 11:00:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id u3szBg6emy8m; Mon, 26 Apr 2010 11:00:25 +0200 (CEST) Received: from igel.home (ppp-88-217-126-225.dynamic.mnet-online.de [88.217.126.225]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 26 Apr 2010 11:00:25 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id D8D10CA297; Mon, 26 Apr 2010 11:00:24 +0200 (CEST) From: Andreas Schwab To: Stefano Lattarini Subject: Re: bug#5926: feature request: mv -p to create missing target dir References: <20100424200803.GA1138@dementia.proulx.com> <201004251529.35918.stefano.lattarini@gmail.com> X-Yow: I'm ZIPPY!! Are we having FUN yet?? Date: Mon, 26 Apr 2010 11:00:24 +0200 In-Reply-To: <201004251529.35918.stefano.lattarini@gmail.com> (Stefano Lattarini's message of "Sun, 25 Apr 2010 15:29:34 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5926 Cc: 5926@debbugs.gnu.org, Rodolfo Borges , bob@proulx.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Stefano Lattarini writes: > Just a few obsevations on side issues... > > Bob Proulx writes: >> Rodolfo Borges wrote: >> >> > cat <> ~/.bashrc >> > function mv() { >> > local target="${!#}" >> > local dir >> > if [[ "$target" =~ '/$' ]]; then >> > dir="$target" >> > else >> > dir="$(dirname "$target")" >> > fi >> > test -d "$dir" || mkdir -vp "$dir" >> > $(which mv) "$@" >> > } >> > EOF >> >> Very good! I see that you have a solution to your problem. >> >> As a side comment I don't see the point of: >> > $(which mv) "$@" > I think that's needed because otherwise the shell function would end > up calling itself recursively, since it's named `mv' too. You use "command mv" for that. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 26 05:32:40 2010 Received: (at 5926) by debbugs.gnu.org; 26 Apr 2010 09:32:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6KgB-0005QV-LB for submit@debbugs.gnu.org; Mon, 26 Apr 2010 05:32:39 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6Kg8-0005QP-Lv for 5926@debbugs.gnu.org; Mon, 26 Apr 2010 05:32:38 -0400 Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id D05F2940069 for <5926@debbugs.gnu.org>; Mon, 26 Apr 2010 11:32:30 +0200 (CEST) Received: from mx.meyering.net (mx.meyering.net [82.230.74.64]) by smtp1-g21.free.fr (Postfix) with ESMTP id F318F9400F3 for <5926@debbugs.gnu.org>; Mon, 26 Apr 2010 11:32:27 +0200 (CEST) Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 94964EF8F; Mon, 26 Apr 2010 11:32:27 +0200 (CEST) From: Jim Meyering To: Stefano Lattarini Subject: Re: bug#5926: feature request: mv -p to create missing target dir In-Reply-To: <201004251529.35918.stefano.lattarini@gmail.com> (Stefano Lattarini's message of "Sun, 25 Apr 2010 15:29:34 +0200") References: <20100424200803.GA1138@dementia.proulx.com> <201004251529.35918.stefano.lattarini@gmail.com> Date: Mon, 26 Apr 2010 11:32:27 +0200 Message-ID: <87ljca7e50.fsf@meyering.net> Lines: 44 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.1 (---) X-Debbugs-Envelope-To: 5926 Cc: 5926@debbugs.gnu.org, Rodolfo Borges , bob@proulx.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.1 (---) Stefano Lattarini wrote: > Just a few obsevations on side issues... > > Bob Proulx writes: >> Rodolfo Borges wrote: >> >> > cat <> ~/.bashrc >> > function mv() { >> > local target="${!#}" >> > local dir >> > if [[ "$target" =~ '/$' ]]; then >> > dir="$target" >> > else >> > dir="$(dirname "$target")" >> > fi >> > test -d "$dir" || mkdir -vp "$dir" >> > $(which mv) "$@" >> > } >> > EOF >> >> Very good! I see that you have a solution to your problem. >> >> As a side comment I don't see the point of: >> > $(which mv) "$@" > I think that's needed because otherwise the shell function would end > up calling itself recursively, since it's named `mv' too. > >> The 'which' command is another one of those simple but not very >> portable commands that does different things on different systems. > Since Rodolfo is assuming bash as his shell, he could have used: > $(type -P mv) "$@" > instead, which is more "portable" because it just uses bash builtins. > >> In the simple case of reporting where the command is found on PATH >> the use here is redundant since the command would otherwise simply >> be found on PATH. >> mv "$@" > No, this would call the `mv' function, since shell functions take > precedence over external commands in bash. Using env is the most portable, at the expense of a fork (compared to bash's "command"): env mv "$@" From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 26 06:15:06 2010 Received: (at 5926) by debbugs.gnu.org; 26 Apr 2010 10:15:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6LLF-0005ks-Q2 for submit@debbugs.gnu.org; Mon, 26 Apr 2010 06:15:05 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6LLD-0005kI-3B for 5926@debbugs.gnu.org; Mon, 26 Apr 2010 06:15:04 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 3CD161C1565D; Mon, 26 Apr 2010 12:14:59 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 1020590F9F; Mon, 26 Apr 2010 12:14:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id nU746qGO+k19; Mon, 26 Apr 2010 12:14:57 +0200 (CEST) Received: from igel.home (ppp-88-217-126-225.dynamic.mnet-online.de [88.217.126.225]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 26 Apr 2010 12:14:57 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 9838FCA297; Mon, 26 Apr 2010 12:14:57 +0200 (CEST) From: Andreas Schwab To: Jim Meyering Subject: Re: bug#5926: feature request: mv -p to create missing target dir References: <20100424200803.GA1138@dementia.proulx.com> <201004251529.35918.stefano.lattarini@gmail.com> <87ljca7e50.fsf@meyering.net> X-Yow: YOW!! What should the entire human race DO?? Consume a fifth of CHIVAS REGAL, ski NUDE down MT. EVEREST, and have a wild SEX WEEKEND! Date: Mon, 26 Apr 2010 12:14:57 +0200 In-Reply-To: <87ljca7e50.fsf@meyering.net> (Jim Meyering's message of "Mon, 26 Apr 2010 11:32:27 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5926 Cc: 5926@debbugs.gnu.org, Rodolfo Borges , Stefano Lattarini , bob@proulx.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Jim Meyering writes: > Using env is the most portable, at the expense > of a fork (compared to bash's "command"): Note that command is also part of the POSIX shell. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 26 07:10:37 2010 Received: (at 5926) by debbugs.gnu.org; 26 Apr 2010 11:10:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6MCz-0006DO-Bd for submit@debbugs.gnu.org; Mon, 26 Apr 2010 07:10:37 -0400 Received: from mail-ew0-f209.google.com ([209.85.219.209]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6LED-0005gu-V4 for 5926@debbugs.gnu.org; Mon, 26 Apr 2010 06:07:50 -0400 Received: by ewy1 with SMTP id 1so3834654ewy.15 for <5926@debbugs.gnu.org>; Mon, 26 Apr 2010 03:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:cc:mime-version:content-type :content-transfer-encoding:message-id; bh=3kvksWJn3UR1YS7nct5//yoCUfZQBvFL8qWBCd0ELpQ=; b=HK/h0++5cWP10GmGTJFxVuphsm/Fg7y6txcpXdPM+PWxLjGzD2rWRRJ3N/LgMr+JLj BpuKAwmTa7uZ7oRtqzkFyTE4SQzHmEFBSilbuxsFbdeHBwzQ/2ckklmYyV+gbg0a/Fui TcnmC8FfLgCl0FLZaChVvd3Z4UwR/INZWGfXM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:cc :mime-version:content-type:content-transfer-encoding:message-id; b=K7BXMFO4qukcb5jjQwfnzkR9tzEG1knAA9AXZfie1Pp6LIKk182RLd5JfKYbZjbP/W Jyy1Zf7s/GBJ5QkS8EnMurrqiZMoVKkRKtb6UpidLRMdm+Z8L2HwNnAYsXIrq7bK8+/V /5VV0hIDm6IPN3DHPWJnqHFb5GjB8pFRM4vuY= Received: by 10.213.44.71 with SMTP id z7mr1430577ebe.53.1272276466752; Mon, 26 Apr 2010 03:07:46 -0700 (PDT) Received: from bigio.localnet (host144-95-dynamic.0-79-r.retail.telecomitalia.it [79.0.95.144]) by mx.google.com with ESMTPS id 15sm1978923ewy.4.2010.04.26.03.07.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 03:07:46 -0700 (PDT) From: Stefano Lattarini To: Jim Meyering Subject: Re: bug#5926: feature request: mv -p to create missing target dir Date: Mon, 26 Apr 2010 12:07:07 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) References: <201004251529.35918.stefano.lattarini@gmail.com> <87ljca7e50.fsf@meyering.net> In-Reply-To: <87ljca7e50.fsf@meyering.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201004261207.08161.stefano.lattarini@gmail.com> X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5926 X-Mailman-Approved-At: Mon, 26 Apr 2010 07:10:33 -0400 Cc: 5926@debbugs.gnu.org, Rodolfo Borges , bob@proulx.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) At Monday 26 April 2010, Jim Meyering wrote: > Using env is the most portable, at the expense > of a fork (compared to bash's "command"): > > env mv "$@" > Generally, this is true. But Rodolfo was assuming bash as his shell anyway, and in this case the use of well-estabilished bash builtins/constructs (like "command", which was there since at least bash 2.0) can IMHO help to increase portability. In fact, this way one doesn't have to remember the limits/idiosyncracies of many different shells and system utilities (and different versions thereof), but only those of one shell, i.e. bash (and I think that anyone who's read the section "Portable Shell Programming" in the autoconf manual could be easily convinced that this is a great advantage). Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 26 07:10:38 2010 Received: (at 5926) by debbugs.gnu.org; 26 Apr 2010 11:10:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6MCz-0006DM-2F for submit@debbugs.gnu.org; Mon, 26 Apr 2010 07:10:37 -0400 Received: from mail-ew0-f209.google.com ([209.85.219.209]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6KIW-0005EM-Qp for 5926@debbugs.gnu.org; Mon, 26 Apr 2010 05:08:13 -0400 Received: by ewy1 with SMTP id 1so3815131ewy.15 for <5926@debbugs.gnu.org>; Mon, 26 Apr 2010 02:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=Y+sNSBVek+cuXtApCaVeDOWdWr02jn+Dez0jXM55bZc=; b=hsOhW5KFInp+9JENwEpgCxHkmKjRbDBwfqh9iTeGgO5MebxZC43oZRrnCB6IZVquTl Y40SrEDbpKlZN2ldJLvpaIw9lIkg5242yrruI37R17XVxZqtDNtDnBvl5nzgTsc99sqs Vqynj/EIV3e6cIk+ZMkyZhxCjL8FawuVf8HIY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=tAMxuxiErtbHLvVQ4OKPw8gP2+qQ9Izxzdi88rcUG8+73q8Q/cix6TlXWYAo0kYXP5 Xyxcpl6BThSMkgOAR9O7Bjdoy/gNaT66Y4pamiDc8lrnqnXBPh4Ls2mUVXdBax27LURd Otc3sNxODamLLRKONc84PVjjchcWYjiJx7gxk= Received: by 10.213.41.193 with SMTP id p1mr125574ebe.0.1272272885884; Mon, 26 Apr 2010 02:08:05 -0700 (PDT) Received: from bigio.localnet (host144-95-dynamic.0-79-r.retail.telecomitalia.it [79.0.95.144]) by mx.google.com with ESMTPS id 13sm1939174ewy.9.2010.04.26.02.08.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 02:08:05 -0700 (PDT) From: Stefano Lattarini To: Andreas Schwab Subject: Re: bug#5926: feature request: mv -p to create missing target dir Date: Mon, 26 Apr 2010 11:07:39 +0200 User-Agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) References: <201004251529.35918.stefano.lattarini@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201004261107.41412.stefano.lattarini@gmail.com> X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5926 X-Mailman-Approved-At: Mon, 26 Apr 2010 07:10:33 -0400 Cc: 5926@debbugs.gnu.org, Rodolfo Borges , bob@proulx.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) At Monday 26 April 2010, Andreas Schwab wrote: > > I think that's needed because otherwise the shell function would > > end up calling itself recursively, since it's named `mv' too. > > You use "command mv" for that. > Good point, I forgot about that. And it works for shell builtins too. Using "command mv" seems indeed the optimal choice. Regards, Stefano From unknown Mon Jun 23 04:15:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 24 May 2010 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 19 11:44:39 2014 Received: (at control) by debbugs.gnu.org; 19 Oct 2014 15:44:39 +0000 Received: from localhost ([127.0.0.1]:55903 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xfset-0003S3-3q for submit@debbugs.gnu.org; Sun, 19 Oct 2014 11:44:39 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:39829) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xfseq-0003Rs-6A for control@debbugs.gnu.org; Sun, 19 Oct 2014 11:44:36 -0400 Received: from [192.168.22.9] (unknown [88.170.160.103]) (Authenticated sender: f0rhum) by smtp6-g21.free.fr (Postfix) with ESMTPSA id D105082323 for ; Sun, 19 Oct 2014 17:43:21 +0200 (CEST) Message-ID: <5443DC71.8010300@free.fr> Date: Sun, 19 Oct 2014 17:44:49 +0200 From: f0rhum User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: re: Archived problem report bug#5926 (bug#5926: feature request: mv -p to create missing target dir) References: In-Reply-To: X-Forwarded-Message-Id: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) unarchive 5926 From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 19 12:08:33 2014 Received: (at 5926) by debbugs.gnu.org; 19 Oct 2014 16:08:33 +0000 Received: from localhost ([127.0.0.1]:55908 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xft21-0005IH-8v for submit@debbugs.gnu.org; Sun, 19 Oct 2014 12:08:33 -0400 Received: from smtp6-g21.free.fr ([212.27.42.6]:43626) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xft1y-0005I6-Rq for 5926@debbugs.gnu.org; Sun, 19 Oct 2014 12:08:31 -0400 Received: from [192.168.22.9] (unknown [88.170.160.103]) (Authenticated sender: f0rhum) by smtp6-g21.free.fr (Postfix) with ESMTPSA id 28C5C822C8 for <5926@debbugs.gnu.org>; Sun, 19 Oct 2014 18:07:18 +0200 (CEST) Message-ID: <5443E267.50202@free.fr> Date: Sun, 19 Oct 2014 18:10:15 +0200 From: f0rhum User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: 5926@debbugs.gnu.org Subject: Re: bug#5926: feature request: mv -p to create missing target dir Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 5926 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > ...is mv > counter to The Unix Philosophy ? > Small is > beautiful. Make each program do one thing well. Choose portability > over efficiency. Use shell scripts to increase leverage and > portability. Would mv be discarded to the benefit of cp + rm? Ok, I know we can't because mv also does in place rename. But when it's time to real move who does use cp then rm? From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 19 19:09:41 2014 Received: (at 5926) by debbugs.gnu.org; 19 Oct 2014 23:09:41 +0000 Received: from localhost ([127.0.0.1]:56134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XfzbY-0001f9-Qv for submit@debbugs.gnu.org; Sun, 19 Oct 2014 19:09:41 -0400 Received: from joseki.proulx.com ([216.17.153.58]:59244) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XfzbW-0001f1-7m for 5926@debbugs.gnu.org; Sun, 19 Oct 2014 19:09:39 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 325E821229; Sun, 19 Oct 2014 17:09:37 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 1B8E02DC19; Sun, 19 Oct 2014 17:09:37 -0600 (MDT) Date: Sun, 19 Oct 2014 17:09:37 -0600 From: Bob Proulx To: f0rhum Subject: Re: bug#5926: feature request: mv -p to create missing target dir Message-ID: <20141019170504442244665@bob.proulx.com> References: <5443E267.50202@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5443E267.50202@free.fr> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 5926 Cc: 5926@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) f0rhum wrote: > > ...is > mv > > counter to The Unix Philosophy > ? > > Small is > > beautiful. Make each program do one thing well. Choose portability > > over efficiency. Use shell scripts to increase leverage and > > portability. > > Would mv be discarded to the benefit of cp + rm? > Ok, I know we can't because mv also does in place rename. But when > it's time to real move who does use cp then rm? The mv command causes an atomic rename(2) to occur if on the same file system. That is not possible when using cp + rm. Therefore mv is required. If mv'ing a file from one file system to another it is impossible to have an atomic rename(). In that case mv falls back to effectively cp plus rm. That is mentioned in the mv documentation. Bob From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 20 07:20:07 2014 Received: (at 5926) by debbugs.gnu.org; 20 Oct 2014 11:20:08 +0000 Received: from localhost ([127.0.0.1]:56352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgB0R-0005Dr-9F for submit@debbugs.gnu.org; Mon, 20 Oct 2014 07:20:07 -0400 Received: from smtp3-g21.free.fr ([212.27.42.3]:25609) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgB0O-0005Dg-Mq for 5926@debbugs.gnu.org; Mon, 20 Oct 2014 07:20:05 -0400 Received: from zimbra62-e11.priv.proxad.net (unknown [172.20.243.212]) by smtp3-g21.free.fr (Postfix) with ESMTP id 4146AA6340 for <5926@debbugs.gnu.org>; Mon, 20 Oct 2014 13:18:41 +0200 (CEST) Date: Mon, 20 Oct 2014 13:20:03 +0200 (CEST) From: f0rhum@free.fr To: 5926@debbugs.gnu.org Message-ID: <2001994555.194136746.1413804003615.JavaMail.root@zimbra62-e11.priv.proxad.net> In-Reply-To: <20141019170504442244665@bob.proulx.com> Subject: Re: bug#5926: feature request: mv -p to create missing target dir MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [88.170.160.103] X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Linux)/7.2.0-GA2598) X-Authenticated-User: f0rhum@free.fr X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 5926 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > The mv command causes an atomic rename(2) to occur if on the same file > system. That is not possible when using cp + rm. Therefore mv is > required. Hi Bob. I am just trying to understand why this very request is refused with the argument "small is beautiful", when the "-p" was accepted for cp: I mean why wasn't refused "cp -p" request, saying "just use mkdir first". This seems unfair for mv to be refused the ease of use cp was offered. Maybe I have a problem with understanding this "atomic" word which also stunned myself in iptables documentation. > If mv'ing a file from one file system to another it is impossible to > have an atomic rename(). In that case mv falls back to effectively cp > plus rm. That is mentioned in the mv documentation. The same "You have to know if the parent exists" argument that was opposed to this request could have also been opposed: "You have to know if you are moving in the same file system or an other, so we stick to rename+cp+rm, no need for mv at all, small is beautiful, do one thing and do it well". That's not to argue. Just coming to GNU since 6 years from closed source OSes where nobody wouldn't even have the idea to ask why this-and-that, I realize here I can ask why, e.g. why we haven't some kind of uniformity in commands parameters --long and -short for various commands. This would be a great help for average users. Somebody once replied to me "it is because many different people work(ed) on these commands, at different time...". Just a pure fact we have to live with. Is it the same inside the coreutils team too? Bye bye Fabrice From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 20 12:40:08 2014 Received: (at 5926) by debbugs.gnu.org; 20 Oct 2014 16:40:08 +0000 Received: from localhost ([127.0.0.1]:57454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgG06-00086K-UZ for submit@debbugs.gnu.org; Mon, 20 Oct 2014 12:40:07 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:46805) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgG00-00085P-Dt for 5926@debbugs.gnu.org; Mon, 20 Oct 2014 12:40:01 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3jM3bd6HqRz3hjWt; Mon, 20 Oct 2014 18:39:57 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3jM3bd47zPzvlwG; Mon, 20 Oct 2014 18:39:57 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id SzVdMLq5fJDW; Mon, 20 Oct 2014 18:39:50 +0200 (CEST) X-Auth-Info: pJ5Ag99lfA0+tdCSHyC4PVFCifhC36naFt1dYJjwD/BdCnzTYbVjRJ6sQH3Se4d1 Received: from igel.home (ppp-188-174-153-47.dynamic.mnet-online.de [188.174.153.47]) by mail.mnet-online.de (Postfix) with ESMTPA; Mon, 20 Oct 2014 18:39:50 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 24C9A2C3749; Mon, 20 Oct 2014 18:39:50 +0200 (CEST) From: Andreas Schwab To: Bob Proulx Subject: Re: bug#5926: feature request: mv -p to create missing target dir References: <5443E267.50202@free.fr> <20141019170504442244665@bob.proulx.com> X-Yow: It's a lot of fun being alive... I wonder if my bed is made?!? Date: Mon, 20 Oct 2014 18:39:50 +0200 In-Reply-To: <20141019170504442244665@bob.proulx.com> (Bob Proulx's message of "Sun, 19 Oct 2014 17:09:37 -0600") Message-ID: <871tq2elux.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 5926 Cc: 5926@debbugs.gnu.org, f0rhum X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Bob Proulx writes: > The mv command causes an atomic rename(2) to occur if on the same file > system. That is not possible when using cp + rm. Therefore mv is > required. Also, you can rename a file that you cannot read. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 21 21:10:50 2014 Received: (at 5926) by debbugs.gnu.org; 22 Oct 2014 01:10:50 +0000 Received: from localhost ([127.0.0.1]:58951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgkRu-0004P9-5n for submit@debbugs.gnu.org; Tue, 21 Oct 2014 21:10:50 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:41680) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgkRs-0004Ow-KB for 5926@debbugs.gnu.org; Tue, 21 Oct 2014 21:10:49 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id CBA36A60047; Tue, 21 Oct 2014 18:10:42 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lybCiyVv9lre; Tue, 21 Oct 2014 18:10:34 -0700 (PDT) Received: from [192.168.1.9] (pool-71-177-17-123.lsanca.dsl-w.verizon.net [71.177.17.123]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2F7ACA6000E; Tue, 21 Oct 2014 18:10:34 -0700 (PDT) Message-ID: <54470409.4040309@cs.ucla.edu> Date: Tue, 21 Oct 2014 18:10:33 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: f0rhum@free.fr, 5926@debbugs.gnu.org Subject: Re: bug#5926: feature request: mv -p to create missing target dir References: <2001994555.194136746.1413804003615.JavaMail.root@zimbra62-e11.priv.proxad.net> In-Reply-To: <2001994555.194136746.1413804003615.JavaMail.root@zimbra62-e11.priv.proxad.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.7 (---) X-Debbugs-Envelope-To: 5926 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.7 (---) f0rhum@free.fr wrote: > I mean why wasn't refused "cp -p" request, saying "just use mkdir first". There seems to be a good deal of confusion here, as "cp -p" has nothing to do with "mkdir -p". From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 22 04:16:28 2014 Received: (at 5926) by debbugs.gnu.org; 22 Oct 2014 08:16:28 +0000 Received: from localhost ([127.0.0.1]:59097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgr5n-0006jS-3V for submit@debbugs.gnu.org; Wed, 22 Oct 2014 04:16:27 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:20227) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgr5l-0006jG-As for 5926@debbugs.gnu.org; Wed, 22 Oct 2014 04:16:26 -0400 Received: from zimbra62-e11.priv.proxad.net (unknown [172.20.243.212]) by smtp4-g21.free.fr (Postfix) with ESMTP id DCF1A4C80F1 for <5926@debbugs.gnu.org>; Wed, 22 Oct 2014 10:14:57 +0200 (CEST) Date: Wed, 22 Oct 2014 10:16:23 +0200 (CEST) From: f0rhum@free.fr To: 5926@debbugs.gnu.org Message-ID: <673288570.199628509.1413965783373.JavaMail.root@zimbra62-e11.priv.proxad.net> In-Reply-To: <54470409.4040309@cs.ucla.edu> Subject: Re: bug#5926: feature request: mv -p to create missing target dir MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [88.170.160.103] X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - FF3.0 (Linux)/7.2.0-GA2598) X-Authenticated-User: f0rhum@free.fr X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 5926 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) >> I mean why wasn't refused "cp -p" request, saying "just use mkdir first". > There seems to be a good deal of confusion here, as "cp -p" has nothing to do > with "mkdir -p". Oooops, sorry, I meant: why wasn't refused mkdir "-p" option request, saying "just use ls and mkdir first"? Hmmm, ok, I see they are both about creating dirs, but aren't mkdir, cp, mv, touch... all involved in creating links in a file system? Hmmm... It seems I triggered an endless loop in my own mind: confusion was yet there. Let's call this ignorance, lazziness. Mum! From unknown Mon Jun 23 04:15:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 19 Nov 2014 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator