0

I'd like to list files grouped in such a sequence: ALL hidden files, directories, and the rest sorted by extension. So I made an alias in .bashrc like this:

alias ll="LC_COLLATE=C ls -AlhF --sort=extension --group-directories-first"

However this fails to put all the hidden files at first, only ending up sorting extension first and dot files second.

Any one can help me to achieve the goal?

1 Answer 1

0

Works for me, but there is a catch: a .hidden file is sorted as a .hidden extension, while a .hidden.txt file is sorted as a .txt (ahead of others .txt, because the empty string is sorted ahead...).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .