我想实现对某个文件夹以及它的子文件夹中任何文件名为student的文件改名为teacher,请问怎么做呀?
谢谢 好多啊
改名不是可以用通配符吗?
类似于:mv 123* 321* 这样子的
find DIR -type f -iname ‘student’ -exec rename ‘s/student/teacher/’ {} ;
DIR就是你要的目录,或者进入DIR后
find . -type f -iname ‘student’ -exec rename ‘s/student/teacher/’ {} ;