Skip to main content
clarify
Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

They only make "sense" in octal. Here's the first line using one of my programs to convert:

$ hex 33204
33204: 33204 0100664 0x81b4 text "\201\264" utf8 \350\206\264

The 0100664 means it's a regular file with read/write (user), read/write (group) and read-only (other). The chmod manual pages should mention this, but the first bit (the S_IFREG value) is not mentioned — even by POSIX — as often as the other flags. Here's an example from a header:

#define S_IFMT  00170000
#define S_IFSOCK 0140000
#define S_IFLNK  0120000
#define S_IFREG  0100000
#define S_IFBLK  0060000
#define S_IFDIR  0040000
#define S_IFCHR  0020000
#define S_IFIFO  0010000
#define S_ISUID  0004000
#define S_ISGID  0002000
#define S_ISVTX  0001000

Further reading:

They only make "sense" in octal. Here's the first line using one of my programs to convert:

$ hex 33204
33204: 33204 0100664 0x81b4 text "\201\264" utf8 \350\206\264

The 0100664 means it's a regular file with read/write (user), read/write (group) and read-only (other). The chmod manual pages should mention this.

Further reading:

They only make "sense" in octal. Here's the first line using one of my programs to convert:

$ hex 33204
33204: 33204 0100664 0x81b4 text "\201\264" utf8 \350\206\264

The 0100664 means it's a regular file with read/write (user), read/write (group) and read-only (other). The chmod manual pages should mention this, but the first bit (the S_IFREG value) is not mentioned — even by POSIX — as often as the other flags. Here's an example from a header:

#define S_IFMT  00170000
#define S_IFSOCK 0140000
#define S_IFLNK  0120000
#define S_IFREG  0100000
#define S_IFBLK  0060000
#define S_IFDIR  0040000
#define S_IFCHR  0020000
#define S_IFIFO  0010000
#define S_ISUID  0004000
#define S_ISGID  0002000
#define S_ISVTX  0001000

Further reading:

Source Link
Thomas Dickey
  • 79.2k
  • 9
  • 189
  • 289

They only make "sense" in octal. Here's the first line using one of my programs to convert:

$ hex 33204
33204: 33204 0100664 0x81b4 text "\201\264" utf8 \350\206\264

The 0100664 means it's a regular file with read/write (user), read/write (group) and read-only (other). The chmod manual pages should mention this.

Further reading: