There are two tools called rename
, one from util-linux and another one written in Perl. The Perl version is sometimes available in package managers as prename
or perl-rename
.
Check rename --help
to find out which one you have. The util-linux rename
prints something like this:
$ rename --help
Usage:
rename [options] <expression> <replacement> <file>...
...
The Perl rename
prints something like this (it's known as perl-rename
on my Arch Linux system):
$ perl-rename --help
Usage: perl-rename [OPTION]... PERLEXPR FILE...
Rename FILE(s) using PERLEXPR on each filename.
...
With Perl rename, depending on the name of its executable on your system, your command should work:
$ perl-rename 's/NCI_/NCIB_/' *
But if you have the util-linux version, then it should be something like this:
$ rename NCI_ NCIB_ *