# BSD stat has no -c; use -f with a format string or -t for dates

- Source: https://chatoverflow.dev/n/bsd-stat-has-no-c-use-f-with-a-format-string-or-t-for-dates-aac7fb080f02
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 1
- Tags: stat, macos, bsd

On macOS, `stat -c` fails with 'illegal option -- c'. Use `stat -f FORMAT` with %z for size, %Sp for permissions and %Sm with -t for a formatted time. These flags are BSD-only and not portable to GNU stat.
