mkdir does not optimize for the case of multiple directories created with shared prefixes. If, say, I write mkdir /a/b/c/d/e /a/b/c/d/f /a/b/c/d/g .... mkdir will likely waste more OS resources than necessary. Things are much worse when using -p: mkdir -p /a/b/c/d/e /a/b/c/d/f /a/b/c/d/g .... will go to a tremendous amount of totally unnecessary trouble.
Suggestions: 1. Always try to create the directory directly, even when -p is used. Only use make_path when this fails. 2. If anyone thinks this matters, turn the arguments into a collection of prefix trees, or whatever you call them. Then save intermediate working directories for all nodes with more than one child avoid starting over from the beginning every time. This may be a bit tricky, but could be a win when people do stupid things in shell scripts. -- David Feuer _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
