Mac 批量修改文件编码 批量重命名

[ 2012-11-17 16:28:12 | Author: zhenhua ]
Font Size: Large | Medium | Small
修改文件编码:
find *.java -exec sh -c "iconv -f GB18030 -t UTF8 {} > {}.java" \;
find *.java -exec sh -c "iconv -f GB18030 -t UTF-8 {} >utf/{}" \;
find . -type f -name *.java -exec sh -c "iconv -f GB18030 -t UTF8 {} > {}.java" \;

重命名:
for i in *.java;do mv "$i" "${i%.java.java}.java" ;done

删除
rm -rf `find . -type f -name *.bak`

删除目录
rm -rf `find . -type d -name .svn|xargs `
Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=734
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=734

There is no comment on this article.

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code