bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug with "mkdir -p -m ____ ..."


From: skt
Subject: bug with "mkdir -p -m ____ ..."
Date: Wed, 24 Nov 2004 14:27:36 -0800

I think that if both the -p and -m __mode__
options are used with mkdir, then the __mode__
should be used when making any new directories,
not just the last one.

The way it works now, the umask bits are used
for all intermediate directories, and the __mode__
value is only applied to the directory named
on the command line.

I could see value in making it work either way
though, so perhaps there should be another option
to allow the user to configure this.
How about a -u/--umask __umask__ option, to
apply a umask that applies to all new directories
that are created.   For example:
     mkdir -p -u 000 /tmp/a/b/c/d

To get this behavior now, in a script I have to
do this:
    umask=`umask`
    umask 0
    mkdir -p _______
    umask $umask

I am using mkdir version 4.5.3 on RedHat Linux 9.0.

Thanks,
Stan Tazuma
Boeing




reply via email to

[Prev in Thread] Current Thread [Next in Thread]