例如,我有这些文件:
/Applications/Emacs.app/Contents/Resources/etc/images/custom/README
/Applications/Emacs.app/Contents/Resources/etc/images/ezimage/README
/Applications/Emacs.app/Contents/Resources/etc/images/gnus/README
/Applications/Emacs.app/Contents/Resources/etc/images/gud/README
/Applications/Emacs.app/Contents/Resources/etc/images/icons/README
我想把它们全部收集起来,用不同的名字保存在一个目录中,所以它们变成了这样:
/dest/custom_README
/dest/ezimage_README
/dest/gnus_README
/dest/gud_README
/dest/icons_README
我知道find
并且xargs
可能对完成这项工作有用,但不知道如何rename
根据其目录名称执行该步骤。
有人对此有想法吗?谢谢!