06-26-04 03:11 PM
I'm using stat to get the.... well, the stats of a number of files for
reporting. The st_mode for a regular file, when printed out in octal (%o
modifier), results in a number such as 100744 where the last 3 digits
(octets?) are the permissions specification. For a directory, the output is
(e.g.) 40744.
Can I instruct printf to show me only the last 4 digits of this number (ie,
0744)? Or will i have to do some string manipulation on it to get it to
print out the way I want?
Any insight is greatly appreciated.
-cjl
[ Post a follow-up to this message ]
|