Você pode usar o comando rename
. Não é portátil, mas existe em diferentes formas em diferentes distribuições.
No CentOS / RHEL e provavelmente no Fedora:
rename .mp4 .audio *.mp4
Deve fazer isso. De man rename
no CentOS 6:
SYNOPSIS
rename from to file...
rename -V
DESCRIPTION
rename will rename the specified files by replacing the first occur-
rence of from in their name by to.
No Ubuntu e provavelmente em qualquer variante do Debian:
rename 's/\.mp4$/.audio/' *.mp4
deve fazer isso. De man rename
no Ubuntu 14.04:
SYNOPSIS
rename [ -v ] [ -n ] [ -f ] perlexpr [ files ]
DESCRIPTION
"rename" renames the filenames supplied according to the rule specified
as the first argument. The perlexpr argument is a Perl expression
which is expected to modify the $_ string in Perl for at least some of
the filenames specified. If a given filename is not modified by the
expression, it will not be renamed. If no filenames are given on the
command line, filenames will be read via standard input.
For example, to rename all files matching "*.bak" to strip the
extension, you might say
rename 's/\.bak$//' *.bak