0

My original plan was to pipe "ls -l", get the permission string that represented the file in question. Translate the string of 'r's 'w's 'x's '-'s into 0s and 1s then convert it from binary to octal.

This seems really cumbersome and annoying and I gotta figure there is some faster way. Even getting a string representation of the octal value would be great. I'm working in C on a linux environment btw.

Ideas?

Thanks!

2
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by BLUEC0RE
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.