On Fri, Jul 03, 2020 at 11:38:34PM +0200, Bernhard Voelker wrote: > On 2020-05-11 05:16, Vito Caputo wrote: > > Does this already exist? > > > > Was just moving a .tgz into a deep path and realized I hadn't created > > it on that host, and lamented not knowing what convenient flag I could > > toss on the end of the typed command to make `mv` do the mkdir -p > > first for me. > > > > I was surprised to not see it in mv --help or mv(1) when I checked for > > next time... > > mv(1) is ... well, for moving files and directories. And creating the > destination > directory in the same go seems to be a seldom case. We see also from the > missing > answers so far, that nobody seems to be much excited about this feature. > Anyway, as it's very easy to work around it with a separate mkdir(1), it's > better > to avoid adding complexity to the code. >
Considering install(1) already establishes precedent -D as a means of augmenting --target-directory to create parents, and both cp(1) and mv(1) provide --target-directory, it strikes me as an existing inconsistency to be arguably fixed on those grounds alone. So I actually think this should extend to cp(1) as well, and -D is available in both. That's my $.02, maybe others will chime in this time around - it's possible people were just busy with life, it has been kind of crazy lately. Thanks, Vito Caputo