Um simples loop for com um pouco de sed
fará o truque:
% touch xxxxx{foo,bar,baz}
% ls -l xxxxx{foo,bar,baz}
-rw-r--r-- 1 jamesog wheel 0 29 Dec 18:07 xxxxxbar
-rw-r--r-- 1 jamesog wheel 0 29 Dec 18:07 xxxxxbaz
-rw-r--r-- 1 jamesog wheel 0 29 Dec 18:07 xxxxxfoo
% for file in xxxxx*; do mv $file $(echo $file | sed -e 's/^.....//'); done
% ls -l foo bar baz
-rw-r--r-- 1 jamesog wheel 0 29 Dec 18:07 bar
-rw-r--r-- 1 jamesog wheel 0 29 Dec 18:07 baz
-rw-r--r-- 1 jamesog wheel 0 29 Dec 18:07 foo
O substituto regex em sed
diz que combina cinco caracteres ( .
significa qualquer caractere) no inicie a string ( ^
) e remova-a.