GNU bug report logs - #55937
[PATCH] touch: create parent directories if needed

Previous Next

Package: coreutils;

Reported by: Alan Rosenthal <alan.rosenthal <at> gmail.com>

Date: Mon, 13 Jun 2022 04:33:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alan Rosenthal <alan.rosenthal <at> gmail.com>
Cc: 55937 <at> debbugs.gnu.org
Subject: bug#55937: [PATCH] touch: create parent directories if needed
Date: Tue, 14 Jun 2022 21:37:36 -0500
On 6/14/22 19:20, Alan Rosenthal wrote:
> `touch -p a/b/c/d/e` will now be the same as running:
> `mkdir -p a/b/c/d && touch a/b/c/d/e`.

I don't see how this useful enough to merit a change, since one can 
achieve the effect of the proposed "touch -p" with the already-existing 
"mkdir -p" followed by plain "touch". mkdir -p already exists and should 
work everywhere that's POSIX-compatible. We don't need -p for other 
commands that create files (e.g., cp, mv, ln); what's special about 'touch'?





This bug report was last modified 3 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.