Quantcast
Viewing latest article 7
Browse Latest Browse All 7

Batch copy then rename multiple files on linux

You can use this script to rename multiple files on linux.

for i in us_*;
do cp $i `echo $i|sed ‘s/us_/nz_/g`;
done

The first line will loop to your files matching us_*. Then it will copy the listed files, piping it to sed to do a quick replacement from us_* to uk_*.

Hope this helps Image may be NSFW.
Clik here to view.
:)


Viewing latest article 7
Browse Latest Browse All 7

Trending Articles