LINUX GBK->UTF-8文件编码批量转换脚本

转自:http://www.xiaojb.com/archives/it/convert-gbk-utf-8.shtml 

LINUX 转换文件编码 GBK->UTF-8文件编码批量转换脚本 

find default -type d -exec mkdir -p utf/{} \;
find default -type f -exec iconv -f GBK -t UTF-8 {} -o utf/{} \;

这两行命令将default目录下的文件由GBK编码转换为UTF-8编码,目录结构不变,转码后的文件保存在utf/default目录下。

此条目发表在 服务器&PC 分类目录。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>