find ./ams -type f -exec php iconv.php {} \;
ams是指你要转码的目录
iconv.php代码如下
<?php
$file = $argv[1];
$data = file_get_contents($file);
$data2 = mb_convert_encoding($data,'UTF-8','GBK');
file_put_contents($file,$data2);
unset($data2);unset($data);unset($file);