stat

gets file information 

Command


SYNOPSIS

stat [-AacLlMmqSs] file [...]


DESCRIPTION

The stat utility displays file information similar to the stat() C function call.

See the stat miscellaneous information reference page for more detail on the availability and description of the option data.

Normally, the stat displays the name of the file, a string describing the option and the option's values, in a tab-separated list, with one option per line.

Note:

On a FAT file system, modification time has a resolution of two seconds and access time has a resolution of one day.

Options

-A 

sets all of the options below (expect -q). That is, it is equivalent to -acLlMmSs.

-a 

displays the time (in seconds since midnight on January 1, 1970) the file was last accessed.

-c 

displays the time (in seconds since midnight on January 1, 1970) the file was created.

-L 

follows symbolic links.

Note:

Symbolic links are only available on 7/2008R2/8/2012/2016 systems with the NTFS file system.

-l 

displays the number of hard links for the specified file.

-M 

displays the encoded description of file type and file access permissions for the specified file. This is the file access mode and the last four bytes are as described in the chmod reference page.

-m 

displays the time (in seconds since midnight on January 1, 1970) the file was last modified.

-q 

enables quiet mode. Only option data is displayed.

-S 

displays the string representation of the file access mode.

-s 

displays the file size in bytes.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

An error occurred.

2 

A usage error occurred.


PORTABILITY

Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
chmod, find, ls

Miscellaneous:
stat


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.