The "lsd" command should have a nice parameter wich naturally sorts numbers within text.
The "ls" command has a nice parameter, but "lsd" hasn't:
-v natural sort of (version) numbers within text
I could help to implement this,
but first I would like to make sure how this work because I was confused about the description (version) numbers within text
what's the meaning of the (version)?
AFAIK, -v should sort by file name in natural order, like
Hi @zwpaper , great, that you could help :-)
Normal "ls" has "-v" option which ends up in what you said in both points:
(but I don't know why a capital letter should be sorted before a lower case and I won't mind/care about this)
root@ubuntu-cx11-02:~/temp/1# command ls -lv #h #--time-style=+%Y-%m-%d_%H:%M:%S
total 0
-rw-r--r-- 1 root root 0 Aug 12 09:12 1
-rw-r--r-- 1 root root 0 Aug 12 09:12 2
-rw-r--r-- 1 root root 0 Aug 12 09:12 3
-rw-r--r-- 1 root root 0 Aug 12 09:12 4
-rw-r--r-- 1 root root 0 Aug 12 09:12 10
-rw-r--r-- 1 root root 0 Aug 12 09:12 11
-rw-r--r-- 1 root root 0 Aug 12 09:12 12
-rw-r--r-- 1 root root 0 Aug 12 09:12 20
-rw-r--r-- 1 root root 0 Aug 12 09:12 21
-rw-r--r-- 1 root root 0 Aug 12 09:12 A
-rw-r--r-- 1 root root 0 Aug 12 09:12 B
-rw-r--r-- 1 root root 0 Aug 12 09:12 C
-rw-r--r-- 1 root root 0 Aug 12 09:12 a
-rw-r--r-- 1 root root 0 Aug 12 09:12 b
-rw-r--r-- 1 root root 0 Aug 12 09:12 c
instead of this without "-v":
root@ubuntu-cx11-02:~/temp/1# command ls -l
total 0
-rw-r--r-- 1 root root 0 Aug 12 09:12 1
-rw-r--r-- 1 root root 0 Aug 12 09:12 10
-rw-r--r-- 1 root root 0 Aug 12 09:12 11
-rw-r--r-- 1 root root 0 Aug 12 09:12 12
-rw-r--r-- 1 root root 0 Aug 12 09:12 2
-rw-r--r-- 1 root root 0 Aug 12 09:12 20
-rw-r--r-- 1 root root 0 Aug 12 09:12 21
-rw-r--r-- 1 root root 0 Aug 12 09:12 3
-rw-r--r-- 1 root root 0 Aug 12 09:12 4
-rw-r--r-- 1 root root 0 Aug 12 09:12 a
-rw-r--r-- 1 root root 0 Aug 12 09:12 A
-rw-r--r-- 1 root root 0 Aug 12 09:12 b
-rw-r--r-- 1 root root 0 Aug 12 09:12 B
-rw-r--r-- 1 root root 0 Aug 12 09:12 c
-rw-r--r-- 1 root root 0 Aug 12 09:12 C
Most helpful comment
I could help to implement this,
but first I would like to make sure how this work because I was confused about the description
(version) numbers within textwhat's the meaning of the
(version)?AFAIK,
-vshould sort by file name in natural order, like