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, you can use a loop and mv
:
mv "$f" "${f#[0-9]*-}"
Test
$ ls
23-aa hello aaa23-aa
$ rename 's/^[0-9]*-//;' *
$ ls
aa hello aaa23-aa
Or:
$ ls
23-a aa23-a hello
$ for f in *;
> do
> mv "$f" "${f#[0-9]*-}"
> done
$ ls
a aa23-a hello
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…