Naked Darwin 'stat does not allow the -c option, as it is a GNU extension. Instead, you download gnu binutils, either from a homebrew, or from a port, or from fink, and then use gstat instead of stat.
If you do not want to install gnu binutils, then stick with the standard BSD tools, this way:
stat -f "%p" t.c
will give modes (in octal) and
stat -f "%z" t.c
will give a size.
source
share