[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add create dir on touch
From: |
KE Liew |
Subject: |
Re: add create dir on touch |
Date: |
Thu, 5 Jul 2007 00:33:00 +0200 |
On 7/4/07, Eric Blake <address@hidden> wrote:
According to KE Liew on 7/4/2007 8:14 AM:
> Rather than mkdir -P /path/to/wherever && touch
/path/to/wherever/filename
> It's nicer to have touch -P /path/to/wherever/filename
Thanks for the suggestion. However, it should be spelled -p, not -P.
Care to submit a patch? Remember the documentation as well as the code.
Sorry, am not really a programmer, so no patch :(
On the other hand, I'm not sure whether the primary maintainer, Jim, is
willing to add new features - the problem with a new feature is that you
cannot rely on it in portable scripts, and if the action can portably be
done with existing tools (as you have just demonstrated), then we really
need justification before bloating touch. I suppose you could argue that
by doing the directory and file creation all within a single process that
you can minimize the data races that would otherwise exist in between when
the one process creates the directory and the other process then tries to
create the file.
Hm, I understand where you're coming from. I've no justification for it
besides convenience.
Thanks anyway. :)
KwangErn