home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


umask

umask 
expr

Sets the umask for the process to expr and returns the old one. (The umask tells Unix which permission bits to disallow when creating a file.) If expr is omitted, the function merely returns the current umask. For example, to ensure that the "other" bits are turned on and that the "user" bits are turned off, try something like:

umask((umask() & 077) | 7);


Previous: Reference: ucfirst Perl in a Nutshell Next: Reference: undef
Reference: ucfirst Book Index Reference: undef

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.