关于unix重命名
时间:2008-07-02 来源:aqcjsy1
# change file name
mv -f old_file new_file # rename all files'extension to 'bak' in the directory.
for i in $(ls *.*); do mv -f $i ${i%.*}.bak; done # rename all files with special pattern to 'bak' in the directory.
for i in $(ls *.doc); do mv -f $i ${i%.doc}.bak; done
mv -f old_file new_file # rename all files'extension to 'bak' in the directory.
for i in $(ls *.*); do mv -f $i ${i%.*}.bak; done # rename all files with special pattern to 'bak' in the directory.
for i in $(ls *.doc); do mv -f $i ${i%.doc}.bak; done
相关阅读 更多 +