⚙️
g - powerful and cross-platform ls
  • Start
  • Installation
  • 🥳Usage
    • Basic
      • View
      • Display
        • Layout
        • Setting
        • Misc
      • Filtering
      • Sorting
    • Advanced
      • default option
      • cli markdown renderer
      • fuzzy match path
      • args
Powered by GitBook
On this page
  • Sort option
  • Dir first
  • Others

Was this helpful?

Edit on GitHub
  1. Usage
  2. Basic

Sorting

Sort option

--sort=order

sort by field, default: ascending and case insensitive.

available fields:

  • nature(default)

  • none(nosort)

  • name

  • .name(sorts by name without a leading dot)

  • size

  • time

  • owner

  • group

  • extension

  • width

  • inode

  • mimetype

field beginning with Uppercase is case sensitive use field followed by '-descend' to sort in descending order

combined

eg: --sort=ext,size-descend,Name

it will sort entries by extension first, for those having the same extension, comparing their size, if two have the same size, comparing their name( case sensitive)

nature sort

type
Priority

hidden directory

0

directory

1

files

2

link

3

name

4

Dir first

List directories before other files

--dir-first

Others

PreviousFilteringNextAdvanced

Last updated 1 year ago

Was this helpful?

Please refer to or try --help

🥳
man page
nature sort