Answer the question
In order to leave comments, you need to log in
How to get a hierarchical list of paths sorted by file type and alphabetically?
Hello!
How to get a hierarchical list of full paths, where files would go first, then directories, and each file type in alphabetical order?
An example of the desired order:
Answer the question
In order to leave comments, you need to log in
The task turned out to be not trivial.
The most beautiful solution is to run find on folders, and put -exec into it, find on files.
Just output a list of paths, with a breadth-first traversal.
List of paths with formatting
List of paths with processing
Related links:
https://stackoverflow.com/questions/12503958/recur...
https://stackoverflow.com/questions/539583/how-do-...
https://unix.stackexchange.com/questions /279895/ho...
https://stackoverflow.com/questions/1086907/can-fi...
https://github.com/tavianator/bfs - wrote a recursive find
I didn't understand what you want. What does not suit for example:
find path -print | sort-g
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question