The other day I realized that often when I'm using touch, I'd like it to have
the ability to create ancestor directories that don't exist, a la mkdir -p. I
quickly hacked together a shell script to do what I want:
http://marc.abramowitz.info/archives/2006/12/22/adding-a-p-option-to-touch/
Then
change_times |= CH_MTIME;
break;
+case 'p':
+ global_mkdir_options.make_ancestor_function = make_ancestor;
+ mode_t umask_value = umask (0);
+ global_mkdir_options.ancestor_mode = (S_IRWXUGO & ~umask_value) |
(S_IWUSR | S_IXUSR)
, 28 Dec 2006 15:40:30 -0800 (PST)
From: Marc Abramowitz <[EMAIL PROTECTED]>
To: Marc Abramowitz <[EMAIL PROTECTED]>, bug-coreutils@gnu.org
Actually, the patch that I just posted is incorrect, because it didn't
actually add a -p option and did that behavior always. Here