#include #include #include int main(int argc, char *argv[]) { struct stat st; if (0 == stat(argv[0], &st)) printf("mode = %x\n", st.st_mode); return 0; }