Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting file permissions in 'NNN' mode

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Hi!

I want to obtain a file's permission in 'NNN' mode, not
in '-rwxrwxrwx' mode.

I mean, I would like a script to get DIRECTLY '666' from
a file, not '-rw-rw-rw'.

Any help?
 
So far as I remember it was:
(^ = Power)

The R = 2^2 = 4
W = 2^1 = 2
X = 2^0 = 1

example: rx = 2^2 + 2^0 = 5

Then you have to make a script that does the
calculation.
Is this what you where asking?

Regards Gregor.Weertman@mailcity.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top