NAME SYNOPSIS OPTIONS DESCRIPTION Filesystem issues HFS+ on OS X / Darwin JFS NFS4 FAT/VFAT and NTFS How to undo double UTF-8 (or other) encoded filenames How to repair Samba files Netatalk interoperability issues SEE ALSO BUGS AUTHOR NAME convmv - converts filenames from one encoding to another SYNOPSIS convmv [options] FILE(S) ... DIRECTORY(S) OPTIONS -f ENCODING specify the current encoding of the filename(s) from which should be converted -t ENCODING specify the encoding to which the filename(s) should be converted -i interactive mode (ask y/n for each action) -r recursively go through directories --nfc target files will be normalization form C for UTF-8 (Linux etc.) --nfd target files will be normalization form D for UTF-8 (OS X etc.). --qfrom , --qto be more quiet about the "from" or "to" of a rename (if it screws up your terminal e.g.). This will in fact do nothing else than replace any non-ASCII character (bytewise) with ? and any control character with * on printout, this does not affect rename operation itself. --exec command execute the given command. You have to quote the command and #1 will be substituted by the old, #2 by the new filename. Using this option link targets will stay untouched. Example: convmv -f latin1 -t utf-8 -r --exec "echo #1 should be renamed to #2" path/to/files --list list all available encodings. To get support for more Chinese or Japanese encodings install the Perl HanExtra or JIS2K Encode packages. --lowmem keep memory footprint low by not creating a hash of all files. This disables checking if symlink targets are in subtree. Symlink target pointers will be converted regardlessly. If you convert multiple hundredthousands or millions of files the memory usage of convmv might grow quite high. This option would help you out in that case. --nosmart by default convmv will detect if a filename is already UTF8 encoded and will skip this file if conversion from some charset to UTF8 should be performed. --nosmart
2021-11-26 11:21:31 27KB convmv-1.15 convmv
1
从windows向Linux拷贝文件后,可能中文会显示乱码。原因是Windows中默认的文件格式是GBK,而Linux一般都是UTF-8。 这时候就需要用到:convmv。 1)redhat系列机器可以用yum install convmv命令来安装。 2)centos6机器可以下载附件安装 rpm -ivh convmv-1.15-2.el6.noarch.rpm 简单用法: convmv -f GBK -t UTF-8 --notest -r ./ 其中,-r选项是递归子目录选项。--notest选项是正式执行改名动作,如果不加此选项,那么只会列出改名后的文件名,但是不会真正改名,你可以先去掉此参数看下改名后的结果,然后在添加上此参数进行改名。./是当前目录。
2019-12-21 21:15:37 31KB convmv convmv-1.15 rpm
1