Problem: Chinese file names under
centos are garbled.
Cause:
The default file name encoding in Linux is UTF8. Due to inconsistent encoding, the file name is garbled.
(Recommended tutorial: centos tutorial)
Solution:
1. Install convmv
yum install convmv
2. Batch recursive modification File name
convmv -f gbk -t utf-8 -r --notest /home/要操作的文件
Common parameters introduction:
-r Recursively process subfolders
-notest Really perform operations. By default, no real operations are performed on files
–list displays all supported encodings
–unescap can be escaped, such as changing it to a space
-i Interactive mode (ask for each conversion to prevent misoperation)
Recommended related video tutorials: linux video tutorial
The above is the detailed content of How to solve garbled Chinese file names under centos. For more information, please follow other related articles on the PHP Chinese website!