Skip to Content
gnux

-c, --format

Use the specified FORMAT instead of the default; output a newline after each use of FORMAT.

An option of statx.

Usage

statx -c FORMAT FILE...
statx --format=FORMAT FILE...

Details

ShortLongValueDefaultMeaning
-c--formatFORMATuse the specified FORMAT instead of the default; output a newline after each use of FORMAT

Examples

Check that an SSH key is private before ssh refuses to use it

statx -c '%a %U %n' ~/.ssh/id_ed25519
Output
600 alice /home/alice/.ssh/id_ed25519

List several files with their permissions and owners, aligned

statx -c '%-25n %A %U:%G' /etc/passwd /etc/shadow /etc/sudoers
Output
/etc/passwd               -rw-r--r-- root:root
/etc/shadow               -rw-r----- root:shadow
/etc/sudoers              -r--r----- root:root
statx -c %N /usr/bin/python3
Output
/usr/bin/python3 -> python3.12

Find a file's mount point

statx -c %m ~/Downloads/movie.mkv
Output
/home

Help in the terminal

gnux help statx --format

On this page