Question: I have a directory containing thousands of files with names

```
t_00xx_000xxx.png

```

I want to change their names to `00xx_000xxx_t.png`

so take the prefix and put it as a postfix, can this be done in only one command

Answer: 
This is possible with the [`rename`](http://manpages.ubuntu.com/manpages/bionic/en/man1/prename.1p.html) command:

First check what *would* be done (by suppliying `-n`). If it looks good, drop the `-n` and run again:

```
rename -n 's/t_(.+)\.png$/$1_t.png/' *.png  # check only
rename    's/t_(.+)\.png$/$1_t.png/' *.png  # actually rename the files

```
`mmv` (available from the `universe` repository) is nice for this kind of thing, where simple shell globs rather than regular expression can do the job

Ex.

```
mmv -n -- '*_*_*.png' '#2_#3_#1.png'
t_00xx_000xxx.png -> 00xx_000xxx_t.png

```

Remove the `-n` once you are happy that it's working right.