-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Gordon Hamachi on 11/21/2008 1:58 PM: > The problem is, when I use mkdir -p -m it only sets the mode of the > last directory. All of the parent directories take the default mode, > which is not what I want. It would be convenient if there were an > option to apply the -m mode to all parents that get created.
Unfortunately for you, this is a feature and not a bug. POSIX requires this behavior: http://www.opengroup.org/onlinepubs/009695399/utilities/mkdir.html "For each dir operand that does not name an existing directory, effects equivalent to those caused by the following command shall occur: mkdir -p -m $(umask -S),u+wx $(dirname dir) && mkdir [-m mode] dir" Your only alternative is to create the directories in hierarchical order yourself (although you should still use the -p option, in case some other process is trying to create the directories in parallel). - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkknlpAACgkQ84KuGfSFAYCcCwCfbAY2085AXcjVmYFmm56pKGCP 8j0AoNZOkbmAwT32qqAH6O/Gr65esmiC =07DG -----END PGP SIGNATURE----- _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
