views:

140

answers:

3

I have files:

hallo_flower.php
hallo_house.php

I need to rename them to:

tjena_flower.php
tjena_house.php
+2  A: 

Something like this?

for f in *.php; do mv $f `echo $f | sed 's/hallo/tjena/'`; done

It assumes you are using a shell like bash.

retracile
Of course. Very nice use of basic unix commands :) Thank you.
Masi
+1  A: 

if using bash shell, no need to call external command.

for f in *.php; do 
  mv "$f" "${f/hallo/tjena}"
done
ghostdog74
A: 

On CMD:

RENAME hallo_*.php tjena_*.php