> Here is a recursive one liner
>
> perl -MFile::Find -e 'find sub{-d && /^(.{5})_/ && (rename($_, $1) ||
> warn "Err: $_ => $1: $!") }, "."'

Non-recursive

perl -e 'opendir $dh,"."; -d && /^(.{5})_/ && (rename($_, $1) || warn "Err: $_ 
=> $1: $!") for readdir $dh'

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to