Ubuntu – How to sort the output of `ls`

command linels

Is it possible to view this output sorted with titlepage_1.pdf before titlepage_19.pdf?

$ ls
allTitlepage.pdf         titlepage_12.pdf  titlepage_19.tex  titlepage_26.pdf  titlepage_32.tex  titlepage_4.tex
allTitlepage.tex         titlepage_12.tex  titlepage_1.pdf   titlepage_26.tex  titlepage_33.pdf  titlepage_5.pdf
assignment.pdf           titlepage_13.pdf  titlepage_1.tex   titlepage_27.pdf  titlepage_34.pdf  titlepage_5.tex
assignment.tex           titlepage_13.tex  titlepage_20.pdf  titlepage_27.tex  titlepage_34.tex  titlepage_6.pdf
graphicsAssignment2.pdf  titlepage_14.pdf  titlepage_20.tex  titlepage_28.pdf  titlepage_35.pdf  titlepage_6.tex
graphicsAssignment2.tex  titlepage_14.tex  titlepage_21.pdf  titlepage_28.tex  titlepage_35.tex  titlepage_7.pdf
README.md                titlepage_15.pdf  titlepage_21.tex  titlepage_29.pdf  titlepage_36.pdf  titlepage_7.tex
thesisTitlepage.pdf      titlepage_15.tex  titlepage_22.pdf  titlepage_29.tex  titlepage_36.tex  titlepage_8.pdf
thesisTitlepage.tex      titlepage_16.pdf  titlepage_22.tex  titlepage_2.pdf   titlepage_37.pdf  titlepage_8.tex
titlepage_0.pdf          titlepage_16.tex  titlepage_23.pdf  titlepage_2.tex   titlepage_37.tex  titlepage_9.pdf
titlepage_0.tex          titlepage_17.pdf  titlepage_23.tex  titlepage_30.pdf  titlepage_38.pdf  titlepage_9.tex
titlepage_10.pdf         titlepage_17.tex  titlepage_24.pdf  titlepage_30.tex  titlepage_38.tex  titlepage_one.pdf
titlepage_10.tex         titlepage_18.pdf  titlepage_24.tex  titlepage_31.pdf  titlepage_3.pdf   titlepage_one.tex
titlepage_11.pdf         titlepage_18.tex  titlepage_25.pdf  titlepage_31.tex  titlepage_3.tex   titlepage_two.tex
titlepage_11.tex         titlepage_19.pdf  titlepage_25.tex  titlepage_32.pdf  titlepage_4.pdf

Best Answer

Use the switch -v [natural sort of (version) numbers within text]

ls -v