change file names

Drew Van Zandt drew.vanzandt at gmail.com
Tue Feb 21 10:03:01 EST 2006


rename exp1 exp2 *.txt

Also:
man rename

--DTVZ

On 2/21/06, Jerry <greenmt at gmail.com> wrote:
> Hi All *nix experts.
>
> Sorry I'm being thick-skinned again here, and begging for the answer of a
> no-brainer question.
>
> I have a bunch of files located in the same directory "/export".
>
>
> Their file names look like below:
>
>
> exp1eve1.txt
>  exp1eve2.txt
>  exp1eve3.txt
>  exp1eve4.txt
>  .....
>
>
> The pattern is that only the last character changes, as you can see,
>  from 1 to 4.
>
>
> My goal is to find a short solution to replace all 4th character, which
>  is "1",  with "2", so they will look like this:
>
>
> exp2eve1.txt
>  exp2eve2.txt
>  exp2eve3.txt
>  exp2eve4.txt
>  .....
>
>
> Any input is much appreciated.
>  Thanks,
> Zhao
>



More information about the gnhlug-discuss mailing list