Skip to main content
Kill -9 Club
Sign in

stat

FilesPackage: coreutils

Everything the system knows about a file: inode, permissions in octal, modification and change times, link count. It is ls -l with nothing rounded or left out.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

stat -c
Chooses what is printed rather than the full record. stat -c '%a %U %G' file gives the octal permissions, the owner and the group, on one line.
stat -f
Asks about the filesystem rather than the file. stat -fc %T /sys/fs/cgroup returns cgroup2fs on a cgroup v2 machine.

Lessons that teach it