Linux view file encoding format and file encoding conversion

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.