Home >Operation and Maintenance >CentOS >How to solve garbled Chinese file names under centos

How to solve garbled Chinese file names under centos

王林
王林Original
2020-03-30 14:13:403255browse

How to solve garbled Chinese file names under centos

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn