The “stat” command

Use this command to display information on one or more files, or a file system.

Command format

stat <OPTION> <FILENAME> [<FILENAMES>...]

Single files

Define the complete path and filename for a single file, as the “ <FILENAME>” variable:

stat <OPTION> <FILENAME>

File system

Enclosed in brackets, include multiple instances of the “ <FILENAME>” variable:, and set each to the complete path and filename of the desired file.

stat <OPTION> [<FILENAME>...]

Note regarding output

Be aware that output is not always the same. Below is a sample output from stat:

File: /
Size: 1024
Filetype: Directory
Mode: (0755/drwxr-xr-x)
Uid: cpcode9391
Gid: storage
Modify: Wed May 17 09:32:09 2006(00021.03:08:08)
Md5sum: -

Available options

The “<OPTION>” variable can be incorporated, using the following:

Option Description
-h, --help Display help information for this command.