Batch rename files
问题 I want to batch re-name a number of files in a directory so that the preceding number and hypen are stripped from the file name. Old file name: 2904495-XXX_01_xxxx_20130730235001_00000000.NEW New file name: XXX_01_xxxx_20130730235001_00000000.NEW How can I do this with a linux command? 回答1: This should make it: rename 's/^[0-9]*-//;' * It gets from the beginning the block [0-9] (that is, numbers) many times, then the hyphen - and deletes it from the file name. If rename is not in your machine