stat
FilesFundamentals In simulator In real LinuxShow detailed file status
Name: stat = status
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
stat shows a file's metadata in detail: size, blocks, inode number, link count, permissions (both octal and symbolic), owner, and the access, modify and change times.
-c prints just the fields you ask for in a custom format, useful in scripts.
Syntax
stat [OPTION]... FILE...Common options
| -c / --format FORMAT | Custom format, e.g. %s size, %a mode, %y mtime |
| --printf FORMAT | Like -c, with escapes such as \n and no newline added |
| -f / --file-system | Show file system status instead |
| -L / --dereference | Describe what a symbolic link points to |
| -t / --terse | Terse: everything on one line |