How to add .xml extension to all files in a folder in Unix/Linux
On the shell, you can do this:
for file in *; do if [ -f ${file} ]; then mv ${file} ${file}.xml fidone
Edit
To do this recursively on all subdirectories, you should use find
:
for file in $(find -type f); do mv ${file} ${file}.xmldone
On the other hand, if you're going to do anything more complex than this, you probably shouldn't use shell
scripts.
Better still
Use the comment provided by Jonathan Leffler below:
find . -type f -exec mv {} {}.xml ';'