티스토리 뷰

파일 목록이 깨져 보임

-rw-r--r-- 1 root root  65954 Jul  8 10:19 ''$'\271''ٶ'$'\367\272''δ'$'\302'' '$'\265\351\306\307''.bmp'
-rw-r--r-- 1 root root  17362 Jul  8 10:19 ''$'\272\323\300\272'' '$'\262\311''.bmp'
-rw-r--r-- 1 root root  65978 Jul  8 10:19 ''$'\272\361\264\251'' '$'\271\346\277\357''.bmp'

convmv 설치

dnf (yum) install convmv

확인

[root@localhost test]# convmv -f cp949 -t utf-8 *
Starting a dry run without changes...
mv "./▒ٶ▒δ▒ ▒▒▒▒.bmp"   "./바람부는 들판.bmp"
mv "./▒▒▒ ▒▒.bmp"       "./붉은 꽃.bmp"
mv "./▒▒ ▒▒▒.bmp"       "./비누 방울.bmp"
No changes to your files done. Would have converted 3 files in 0 seconds.
Use --notest to finally rename the files.

실제로 바꾸기 (파일 내용은 그대로 유지됨)

[root@localhost test]# convmv -f cp949 -t utf-8 --notest *
mv "./▒ٶ▒δ▒ ▒▒▒▒.bmp"   "./바람부는 들판.bmp"
mv "./▒▒▒ ▒▒.bmp"       "./붉은 꽃.bmp"
mv "./▒▒ ▒▒▒.bmp"       "./비누 방울.bmp"
Ready! I converted 3 files in 0 seconds.

변환 완료

-rw-r--r-- 1 root root  65954 Jul  8 10:19 '바람부는 들판.bmp'
-rw-r--r-- 1 root root  17362 Jul  8 10:19 '붉은 꽃.bmp'
-rw-r--r-- 1 root root  65978 Jul  8 10:19 '비누 방울.bmp'

OLD 시스템 (euckr) 에서 생성된 한글이름으로 된 파일이 utf8 (현재) 시스템에서 한글로 된 파일을 불러들일때 자주 발생함

'Linux' 카테고리의 다른 글

nc 네트워크 파일복사  (0) 2025.08.22
lvs ldirectord FTP 분배 설정  (0) 2025.04.25
ERR_SSL_PROTOCOL_ERROR  (0) 2023.10.06
yum repo 모두 다운받기  (0) 2023.01.13
centos5 M2Crypto.SSL.SSLError: unknown protocol  (1) 2023.01.06
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2026/07   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함