moluzhui
moluzhui

Reputation: 1093

How does Linux use Tree command group sorting

Tree can output the directory structure, but I want to be able to sort first by folder and then by file, consistent with the Windows display

The sample is as follows: The first four are directories and the last four are files.

├── abc
├── test1
├── test2
├── www
├── zz
├── a.txt
├── b.txt
├── c.config
└── util.yml

Upvotes: 2

Views: 692

Answers (1)

Malik
Malik

Reputation: 904

From tree --help:

  --dirsfirst   List directories before files (-U disables).

Upvotes: 5

Related Questions