04-11-04 10:36 PM
gogo <stanlitz@hotmail.com> wrote:
> I'd like to rename files with pattern *_new.* to files *_old.* and I
> have diffuculties. The task is to rename these files in the whole
> tree, not in one folder only.
> I try someting like:
> find ../folder *_new.* | do mv "{}" $(echo "{}"|sed s/_new/_old/
g) ";"
> but it does not work for me.
Try something like
find . -type f -name '*_new.*' | while read i; do
mv $i ${i/_new/_old}
done
--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
Linux solution/training/migration, Thin-client
[ Post a follow-up to this message ]
|