文件内容
文件内容
file -i old.txt
iconv -f GBK -t UTF-8 old.txt -o new.txt
find /data/docs -name '*.txt' -exec sh -c 'iconv -f GBK -t UTF-8 "$1" > "$1.utf8"' _ {} \;文件名
文件名
dnf install -y convmv
mkdir -p /tmp/t && cd /tmp/t && touch "测试.txt"
convmv -f GBK -t UTF-8 * --notest # 加 --notest 才真正改名convmv 默认演练模式(只打印计划),确认输出无误后再加 --notest 执行。