# 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
阅读(1307) | 评论(0) | 转发(0) |