Linux的文件重命名为大写 [英] Linux rename files to uppercase
本文介绍了Linux的文件重命名为大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有大量的文件格式为 x00000.jpg
, X00000.jpg
和 xx00000.jpg
。
如何重命名这些文件,以便他们都是大写的,忽略了名的数字部分?
解决方案
对于f *中;做MV - $ F,$(TR [:降低:] [:上:]<<<$ F); DONE
I have large number of files in the format x00000.jpg
, X00000.jpg
and xx00000.jpg
.
How can I rename these files so they are all uppercase, ignoring the numeric part of the name?
解决方案
for f in * ; do mv -- "$f" "$(tr [:lower:] [:upper:] <<< "$f")" ; done
这篇关于Linux的文件重命名为大写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文