iconv があなたの答えだと思います...
フォームマン iconv:
NAME
iconv - Convert encoding of given files from one encoding to another
SYNOPSIS
iconv -f encoding -t encoding inputfile
DESCRIPTION
The iconv program converts the encoding of characters in inputfile from one coded
character set to another. The result is written to standard output unless otherwise
specified by the --output option.
.....
したがって、おそらく
を実行できますfind $my_base_dir -name "*.php" -o -name "*.html" -exec sh -c "( \
iconv -t ISO88592 -f UTF8 {} -o {}.iconv ; \
mv {}.iconv {} ; \
)" \;
これにより、適切な名前のファイルが再帰的に検索され、再エンコードされます (iconv は動作を開始する前に出力を切り詰めるため、一時ファイルが必要です)。
Ubuntu には再コードがあります
$ sudo apt-get install recode
$ recode UTF-8..latin1 *.php
再帰的に、Ted Dziuba に感謝:
$ find . -name "*.php" -exec recode UTF-8..latin1 {} \;