다음과 같은 방법으로 파일이 있습니다
ar01440_1775_17_vc00_00.png ar01440_1775_17_vc00_01.png ar01440_1775_17_vc00_02.png ar01440_1775_17_vc00_03.png ar01440_1775_17_vc00_04.png ar01440_1775_17_vc00_05.png ar01440_1775_17_vc00_06.png ar01440_1775_17_vc00_07.png ar01440_1775_17_vc00_08.png ar01440_1775_17_vc00_09.png ar01440_1775_17_vc00_010.png ar01440_1775_17_vc00_011.png ar01440_1775_17_vc00_012.png ar01440_1775_17_vc00_013.png ar01440_1775_17_vc00_014.png ar01440_1775_17_vc00_015.png ar01440_1775_17_vc00_016.png ar01440_1775_17_vc00_017.png ar01440_1775_17_vc00_018.png ar01440_1775_17_vc00_019.png
이 순서대로 정렬해야 합니다.
원하는 출력:
ar01440_1775_17_vc00_00.png ar01440_1775_17_vc00_01.png ar01440_1775_17_vc00_010.png ar01440_1775_17_vc00_011.png ar01440_1775_17_vc00_012.png ar01440_1775_17_vc00_013.png ar01440_1775_17_vc00_014.png ar01440_1775_17_vc00_015.png ar01440_1775_17_vc00_016.png ar01440_1775_17_vc00_017.png ar01440_1775_17_vc00_018.png ar01440_1775_17_vc00_019.png ar01440_1775_17_vc00_02.png ar01440_1775_17_vc00_03.png ar01440_1775_17_vc00_04.png ar01440_1775_17_vc00_05.png ar01440_1775_17_vc00_06.png ar01440_1775_17_vc00_07.png ar01440_1775_17_vc00_08.png ar01440_1775_17_vc00_09.png
답변1
"en_US.UTF-8" 로케일을 사용하면 정렬 시 "010"이 "01" 앞에 표시됩니다. C
로케일의 강제 정렬이 여기에서 작동합니다.
$ LC_ALL=C ls -1
ar01440_1775_17_vc00_00.png
ar01440_1775_17_vc00_01.png
ar01440_1775_17_vc00_010.png
ar01440_1775_17_vc00_011.png
ar01440_1775_17_vc00_012.png
ar01440_1775_17_vc00_013.png
ar01440_1775_17_vc00_014.png
ar01440_1775_17_vc00_015.png
ar01440_1775_17_vc00_016.png
ar01440_1775_17_vc00_017.png
ar01440_1775_17_vc00_018.png
ar01440_1775_17_vc00_019.png
ar01440_1775_17_vc00_02.png
ar01440_1775_17_vc00_03.png
ar01440_1775_17_vc00_04.png
ar01440_1775_17_vc00_05.png
ar01440_1775_17_vc00_06.png
ar01440_1775_17_vc00_07.png
ar01440_1775_17_vc00_08.png
ar01440_1775_17_vc00_09.png
로케일은 C
다음과 같이 설명됩니다."LC_ALL=C"는 무엇을 합니까?