ls to sort
- By filename (case insensitive)
- By "version" (
I often have directories in which there are some numbered files like
1-FileA 2-FileB ... 9-FileC 10-FileD ... 19-FileE 20-FileF
and so forth. Now, with the
-v option I'm able to make
ls sort by the number prepended to the file name (so I see
10-FileD instead of
2-FileB) and the option
--group-directories-first allows me to list directories first, but the sort is not case insensitive, instead, it shows directories that begin with a (sequence of) uppercase letter(s) and then directories that have only lowercase letters and then files with the same criterion.
I'd like to order them regardless the "casing" of the file/directory name. Is there a way to achieve this without using the
sort command (which would get rid of the coloring produced by the
EDIT: I'm using Debian GNU/Linux and the output of
LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" LC_NUMERIC=it_IT.UTF8 LC_TIME=it_IT.UTF8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=it_IT.UTF8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=it_IT.UTF8 LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT=it_IT.UTF8 LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
Thanks in advance.