April 13, 2021

[Note] Linux Bi-lingual system and file name sort issue

I downloaded NLP related files from Korean sites.  Many file names are in Korean, and I noticed that when I did ls -l, or viewed the files in GUI, the files weren't sorted properly.

This is probably because English (UTF-8) is the system default, and added Korean IME only. 


I did some research and found only one solution -- change the system locale:

In /etc/default/locale, add this line and reboot:

LC_COLLATE="ko_KR.UTF-8"

(reference, https://stevencval.kr/258)

 

 

I rarely have to deal with file names in Korean, so didn't want to make it as default.  But I did need to sort the files properly.

The solution is using mc - Midnight Commander (https://en.wikipedia.org/wiki/Midnight_Commander) sorts the files properly, and organizing files is easier than doing it using plain CLI or GUI.

 

How To Use GNU Midnight Commander In Linux Mint - I Have A ... (image of MC, borrowed from the internet)

 

 


No comments: