entries' meta data to show


show full path (relative to /)


Relative path


Quote name

enclose entry names in double quotes(overridden by --literal)

-Q or --quote-name

print entry names without quoting

--literal or -N

Git status

show git status


Git branch-name/repo-status

with time


the default time is modified time, and can be changed by flag --time-type

or use flag --create --mod --access --birth(macOS)








if you want to show them all, use the option --time-type=accessed,modified,created,birth to combine them

change time-style

the default displaying style is Day.Month'Year Hour:Minute (02.Jan'06 15:04) in Golang

time-style can be changed by option --time-style

g --time --time-style=iso

Available style:

  • iso

  • long-iso

  • full-iso

  • locale

  • +FORMAT (FORMAT is interpreted like in date(1), but not fully supported)

Also, the TIME_STYLE environment variable sets the default style to use.

Relative time

use --relative-time

with size


recursive size

the size of the directory is itself, use g --size --recursive-size to show the size of the whole directory

change unit


or --block-size=...

total size

--total-size --size show the total size of all listing files/directories (overridden by --no-total-size)

with blocks

g --block

with inode

g --inode

not working on Windows

g --link

with owner/group

g --group

g --owner

use uid/gid (sid in Windows)

g --owner/group --numeric

or just g --uid/gid


show the group name only when it's different from the owner

with permission bits

g --perm

with mime type

g --mime

mime parent type

g --mime-parent


g --charset

detect size

when enabling the mime-type option, g will read the file to detect mime type

use --exact-detect-size=512kb/1M/.../nolimit/infinity to change the size of bytes g will read from the file

0 means nolimit

with checksum

g --checksum

default: sha1

use --checksum-algorithm=algo1,algo2... to change algorithm

algo: md5,sha1, sha224, sha256, sha384, sha512, crc32

Last updated