Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install and use the transcoder convmv in Linux

Shulou Source: shulou.com Published: 2022-06-01 09:14:46 10月26日 Update

Today, I will talk to you about the installation and use of the transcoding program convmv in Linux, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

Today, we introduce a tool for file name transcoding-convmv,convmv can help us easily convert a file and all files in a directory, such as gbk to utf8 and so on.

Installation:

The code is as follows:

Yum install convmv

(the example environment here is a CentOS system)

Syntax:

The code is as follows:

Convmv [options] FILE (S)... DIRECTORY (S)

Main options:

1.-f ENCODING

Specifies the encoding of the current file name, such as-f gbk

2.-t ENCODING

Specify the encoding to be converted to, such as-f utf-8

3.-r

Recursively convert all file names in the directory

4.-- list

List all supported encodings

5.-- notest

The default is to print only the converted effect, adding this option to actually perform the conversion operation.

Common parameters:

-r Recursive processing subfolders

-notest actually operates. By default, it does not perform real operations on files.

-list displays all supported encodings

-unescap can do some escaping, such as turning% 20 into a space

-I interaction mode (ask each conversion to prevent misoperation)

How to use convmv:

Convmv-f Source Encoding-t New Encoding [option] File name

Example:

Convert file encoding. Take BIG5 to UTF-8 as an example:

[/ code]

$convmv-f BIG5-t UTF-8 / disk1

[/ code]

List the codes that can be used:

The code is as follows:

$convmv-list

Convert the hexadecimal encoding of% xx in the file name:

The code is as follows:

$convmv-- unescape file

Convert all letters in the file name to lowercase:

The code is as follows:

$convmv-- lower file

It is important to note that it presupposes that only the results of the conversion will be displayed, and the file name will not be changed until the-notest parameter is added.

Several other parameters used are-r will be converted together with the files of the subdirectory,-I is interactive mode, a file asks whether to convert, and so on, you can use the-- help parameter to see the description.

After reading the above, do you have any further understanding of the installation and use tutorial of the transcoder convmv in Linux? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Encodings files codes filenames parameters contents archives support tutorials programs patterns directories UTF-8 recursion no usage examples places subdirectories subdirectories Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information NVidia Linux Huawei