I'm trying to rename a number files, adding a prefix to their name, and found what seems to be an easy way of doing it:-
http://www.mmtek.com/dp20090929/node/201
except it doesn't work for me... all the files end up being renamed as 'PRE_' and the original filename is not appended.
Any idea what I'm doing wrong?
http://www.mmtek.com/dp20090929/node/201
Code:
ls | xargs -I {} mv {} PRE_{}
except it doesn't work for me... all the files end up being renamed as 'PRE_' and the original filename is not appended.
Any idea what I'm doing wrong?