[EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:
> I mean, is there a way to make the command `chmod'
> act upon files in a certain directory that have not been created yet?
[...]
>
> Thanks for any reply,
> Rodolfo
No Rodolfo it can't.
What you want is a bourne shell builtin called:
[...]
`umask'
umask [-p] [-S] [MODE]
Set the shell process's file creation mask to MODE. If MODE
begins with a digit, it is interpreted as an octal number; if not,
it is interpreted as a symbolic mode mask similar to that accepted
by the 'chmod' command. If MODE is omitted, the current value of
the mask is printed. If the `-S' option is supplied without a MODE
argument, the mask is printed in a symbolic format. If the `-p'
option is supplied, and MODE is omitted, the output is in a form
that may be reused as input. The return status is zero if the mode
is successfully changed or if no MODE argument is supplied, and
non-zero otherwise.
Note that when the mode is interpreted as an octal number, each
number of the umask is subtracted from `7'. Thus, a umask of `022'
results in permissions of `755'.
[...]
$ man bash
or
$ info bash
or
type this in konqueror addressbar for more info:
info:/bash/Bourne Shell Builtins
and scroll down to 'umask'
and so typing:
$ umask 022
results in:
-rwxr--r--
IIUC you want to type:
$ umask 177
which results in:
-rw-------
This is only temporary for your current shell unless you add it to
your .bashrc or .bash_profile.
HTH
--
RickS
____________________________________________________
Want to buy your Pack or Services from Mandriva?
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________