I want to list a bunch of files that are sorted by their names excluding the file extension. I have these files in a directory
$ls
mobility_arXiv.tex
mobility_SR.bbl
paper-hj-mm.tex
paper-hj-mm-vp-rkp.tex
paper-hj.tex
I want the output to be
mobility_arXiv.tex
mobility_SR.bbl
paper-hj.tex
paper-hj-mm.tex
paper-hj-mm-vp-rkp.tex
Is there a way to achieve this.
paper-hj-mm.tex
listed beforepaper-hj-mm-vp-rkp.tex
– imsc Apr 30 '14 at 12:55sort
orls
utility doesn't give a damn about file extension – Ashtray May 2 '14 at 5:03LANG=C ls
will sort irrespective of extension, and will thus be an easy solution for this question. See this answer: stackoverflow.com/a/18451819 – Patrick Mevzek Jan 29 '18 at 19:57