stat
Display status of files or filesystems. toybox
On Linux, macOS 1 Sigma rule name it
Linux
Display status of files or filesystems. (with -f = -c "%n %i %l %t %s %S %b %f %a %c %d") The valid format escape sequences for files: %a Access bits (octal) |%A Access bits (flags)|%b Size/512 %B Bytes per %b (512) |%C Security context |%d Device ID (dec) %D Device ID (hex) |%f All mode bits (hex)|%F File type %g Group ID |%G Group name |%h Hard links %i Inode |%m Mount point |%n Filename %N Long filename |%o I/O block size |%s Size (bytes) %t Devtype major (hex) |%T Devtype minor (hex)|%u User ID %U User name |%x Access time |%X Access unix time %y Modification time |%Y Mod unix time |%z Creation time %Z Creation unix time The valid format escape sequences for filesystems: %a Available blocks |%b Total blocks |%c Total inodes %d Free inodes |%f Free blocks |%i File system ID %l Max filename length |%n File name |%s Best transfer size %S Actual block size |%t FS type (hex) |%T FS type (driver name)
stat [-tfL] [-c FORMAT] FILE...
-c FORMATOutput specified FORMAT string instead of default-fDisplay filesystem status instead of file status-LFollow symlinks-tterse (-c "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o")Several platforms
Display file and filesystem information.
Display properties about a specific file such as size, permissions, creation date, and access date among others
stat path/to/fileIdentifyDisplay properties about a specific file, only showing the raw result data without labels
stat --terse path/to/fileIdentifyDisplay information about the filesystem where a specific file is located
stat --file-system path/to/fileIdentifyShow only octal file permissions
stat --format "%a %n" path/to/fileIdentifyShow the owner and group of a specific file
stat --format "%U %G" path/to/fileIdentifyShow the size of a specific file in bytes
stat --format "%s %n" path/to/fileIdentifymacOS
Display file status.
Show file properties such as size, permissions, creation date, and access date among others
stat path/to/fileIdentifyShow file properties verbosely (more similar to Linux's stat)
stat -x path/to/fileIdentifyShow only octal file permissions
stat -f %Mp%Lp path/to/fileIdentify-fDisplay filesystem status instead of file status toyboxShow owner and group of the file
stat -f "%Su %Sg" path/to/fileIdentify-fDisplay filesystem status instead of file status toyboxShow the size of the file in bytes
stat -f "%z %N" path/to/fileIdentify-fDisplay filesystem status instead of file status toybox