Hello everyone.
The system loves order))
For example, I have a Sort folder for example.
Please tell me which team will sort over the alphabet at the top of the alphabet, then, for example, MP4, then MP3, ISO, TXT and they will be located in alphabet or the second option in size.
sort $ ls -l
total 12
drwxr-xr-x 2 tom tom 4096 Jul 11 16:03 a-test1
-rw-r--r-- 1 tom tom 0 Jul 11 16:04 a-test1.txt
drwxr-xr-x 2 tom tom 4096 Jul 11 16:03 b-test2
-rw-r--r-- 1 tom tom 0 Jul 11 16:04 b-test.txt
drwxr-xr-x 2 tom tom 4096 Jul 11 16:03 c-test3
-rw-r--r-- 1 tom tom 0 Jul 11 16:04 c-test.txt
sort $ tree -l
.
├── a-test1
├── a-test1.txt
├── b-test2
├── b-test.txt
├── c-test3
└── c-test.txt
4 directories, 3 files
Using the Mate desktop and Caja, if you click on Edit - Preferences - Views you get a number of settings to configure regarding file arrangement. Some, but not all, of those settings can be made under View - Arrange Items instead.
Other desktop file browsers usually include similar options. Occasionally you might encounter other apps which include their own dialogue to locate files, and these might need setting individually if they provide this function.
If this is not what you are enquiring about then please elaborate further!
see gawk
Also see Unix Powertools
https://www.oreilly.com/library/view/unix-power-tools/0596003307/
NYLXS has 2 copies in the library and a digital edition.
Guys, thank you for your answers.
Unfortunately, your advice did not work) In fact, if any Artix build had this function (alias), it would solve many problems, since by default all files (folders, text files, etc.) are scattered.
Now, for example, I have found a small solution:
#alias
alias ls='ls --group-directories-first --color=auto'
All my folders are alphabetically arranged on the left, now I want the other file types (txt,png,jpeg,iso etc) to be in the same alphabetical order, what other part of the command will do it?
I didn't fully understand what you want to achieve but ls has --sort parameter.
ls --group-directories-first --sort=extension
Read ls man.
Thanks for the inspiration. :)
I looked at the ls-manpage and found this for you: "-X sort alphabetically by entry extension" and that for me (~/.bashrc):
alias ls='ls --color --group-directories-first -ANvx'
alias ll='ls --time-style=+"%F %T" -Fin'
Perfect! :D
Edit:
Added "-v natural sort of (version) numbers within text"
Thank you very much your command worked, the rest of the commands that users wrote and even chatgpt are not))
Now I see first all the folders alphabetically, then pdf files, then txt, then mpeg4, etc