I would like to add the .zip extension to all files. I tried this, however it does not work:
ls | awk '{print $1 " " $1".zip"}' | xargs mv -f
I would like to add the .zip extension to all files. I tried this, however it does not work:
ls | awk '{print $1 " " $1".zip"}' | xargs mv -f
Don't use
xargs
for that!Searching - few links:
man rename:
man wiki: http://en.wikipedia.org/wiki/Man_page
A very simple way to do that is :
if you want to keep current extension:
if you want to replace current extension:
This should do the trick:
(Although I have no idea why you would want to do this...)