In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
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.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.