cd /usr/share/man/zh_CN/
for k in *
do
cd $k
for i in *.gz
do
j=`echo ${i%\.gz}`
gunzip $i
iconv -f gb18030 -t utf8 $j >tmp
mv tmp $j
gzip $j
done
cd ..
done
3)、$ chmod 777 change.sh
4)、$ ./change.sh
3、更改manpath.config文件
如果安装了sed运行下面两个命令
$ sudo sed 's/\(.*\/usr\/share\/man\)\(.*\)/\1\/zh_CN\2\n\1\2/g' /etc/manpath.config > manpath.config.tmp
$ sudo mv -f manpath.config.tmp /etc/manpath.config
如果没有安装sed需要手工修改文件
$ sudo vi /etc/manpath.config
在里面所有的有 /usr/share/man的前面加上/usr/share/man/zh_CN
保存退出。
现在试试$ man find
修改方法参见:http://unix-cd.com/vc/www/22/2007-06/1455.html
manpath.config配置文件参见:http://forum.ubuntu.org.cn/about11115.html&sid=ebe3d0f4a491410780b72d24ef4c59f8