0

I cannot understand how to know if the entry is a directory in a CPIO file (which is based on Unix). For example the c_modes of different files in octal :

120644 --> Link     --> 1010 000 110 100 100 [lrw-r--r--]

120750 --> Link     --> 1010 000 111 101 000 [lrwxr-x---]

040750 --> Directory--> 0100 000 111 101 000 [drwxr-x---]

040755 --> Directory--> 0100 000 111 101 101 [drwxr-xr-x]

100644 --> File     --> 1000 000 110 100 100 [-rw-r--r--]

100750 --> File     --> 1000 000 111 101 000 [-rwxr-x---]

I understand how the r, w and x are calculated but not those leading d, l and -. (from 1010 --> l etc.). Also, I saw different values of the same charachter (i.e. in place of l or b) in the Wikipedia. I can't find a good article explaining those directory and link flags along with their appropriate octal (or binary) values in the web! Can anyone explain?

1 Answer 1

1

I found an answer myself. I looked at the file stat.h and understood it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .