Linux view file encoding format and file encoding conversion
A tool convmv for file name encoding is provided specifically in Linux, which converts the file name from GBK to UTF-8 encoding, or from UTF-8 to GBK.
First look at whether the CONVMV is installed on your system, if it is not installed:
Yum-y Install CONVMV
Installation.
Here's a look at the specific usage of CONVMV:
Convmv-f Source code-T new encoding [options] File name
Common parameters:
-R recursive processing of subfolders
--notest the actual operation, please note that by default, the file does not actually operate, but only the experiment.
--list display of all supported encodings
--unescap can be escaped, such as to turn%20 into a space
For example, we have a UTF8 encoded file name, converted to GBK encoding, the command is as follows:
Convmv-f UTF-8-T GBK--notest UTF8 encoded file name
After this conversion, the "UTF8 encoded file name" will be converted to GBK encoding (only the filename-encoded conversion, the file content will not be changed).
Note: Do not use this command in NTFS and FAT file systems, otherwise it may produce unexpected results, if you want to correctly display the name of NTFS and fat in Linux, can be resolved by the mount parameter, the method to view the man manual.
Perform CONVMV--list view:
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9A/71/wKiom1lV6T3DU8ZGAAANsZsI6AY965.png "title=" 2017-06-30_140031.png "alt=" Wkiom1lv6t3du8zgaaanszsi6ay965.png "/>
This article from "Li Shilong" blog, declined reprint!
Linux view file encoding format and file encoding conversion