printf '%o', (stat $filename)[2] & 07777; # Updated: Thanks to [duff] $unixmode = (stat $filename)[2] & 07777; # Updated. One too few 7s.
In reply to Re: converting stat() $mode to unix file permissions
by BrowserUk
in thread converting stat() $mode to unix file permissions
by hhoffman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |