I'd like to suggest a possible new feature for mkdir and see what people
think of it.

% ln -s nonexistent foo
% mkdir foo
mkdir: cannot create directory `foo': File exists

There could be some kind of -f, --follow option so that mkdir will
create the directory pointed to.  You'd probably use it together with
-p.  Then 'mkdir -fp' would be a way to try everything sensible to make
sure the destination exists and can be used as a directory (ie, is a
directory itself or a symlink to one).

Is this a sensible thing to put in mkdir or is there some existing Unix
idiom that does what I want?

I note that 'touch foo' when foo is a broken symlink will create the
link destination if possible (though without making any directories,
obviously).  Whether this is an argument for or against the new flag to
mkdir I am not sure.

-- 
Ed Avis <[EMAIL PROTECTED]>
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to