User Tools

Site Tools


linux_tools

**This is an old revision of the document!**

文件批量重命名

例如把后缀名由bkscr改成txt。 注意这里如果文件名中有空格的话就一定要加双引号。

for i in *.bkscr ; do
mv -v "$i" "${i%.bkscr}.txt"
done

The auto-run script in bash shell:

- on Mac: ~/.profile

批量中文编码转换 GB18030 到UTF-8

find *.txt -exec sh -c "iconv -f GB18030 -t UTF-8 {} > {}t" \;
for i in *.txtt ; do
mv -v "$i" "${i%.txtt}.txt"
done
linux_tools.1552910026.txt.gz · Last modified: 2019/03/18 19:53 by 118.10.215.103