CmdID

CmdID / Commands

stat

Display status of files or filesystems. toybox

On Linux, macOS 1 Sigma rule name it

Opens CmdID with your command. It is read in your browser and sent nowhere.

Linux

from the toybox, 0BSD

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

from tldr-pages, CC BY 4.0

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/fileIdentify

Display properties about a specific file, only showing the raw result data without labels

stat --terse path/to/fileIdentify

Display information about the filesystem where a specific file is located

stat --file-system path/to/fileIdentify

Show only octal file permissions

stat --format "%a %n" path/to/fileIdentify

Show the owner and group of a specific file

stat --format "%U %G" path/to/fileIdentify

Show the size of a specific file in bytes

stat --format "%s %n" path/to/fileIdentify

Display file status.

Show file properties such as size, permissions, creation date, and access date among others

stat path/to/fileIdentify

Show file properties verbosely (more similar to Linux's stat)

stat -x path/to/fileIdentify

Show only octal file permissions

stat -f %Mp%Lp path/to/fileIdentify
-fDisplay filesystem status instead of file status toybox

Show owner and group of the file

stat -f "%Su %Sg" path/to/fileIdentify
-fDisplay filesystem status instead of file status toybox

Show the size of the file in bytes

stat -f "%z %N" path/to/fileIdentify
-fDisplay filesystem status instead of file status toybox

What detects it

Sigma process creation rules that name stat