I have a folder containing 500 files like this:
xaa
xab
xac
xad
aae
aaf
I want to add ".txt" to the end of all of them to get something like this:
xaa.txt
xab.txt
xac.txt
xad.txt
How would this be done?
I have a folder containing 500 files like this:
xaa
xab
xac
xad
aae
aaf
I want to add ".txt" to the end of all of them to get something like this:
xaa.txt
xab.txt
xac.txt
xad.txt
How would this be done?
With simple find + mv command:
find yourfolder/ -type f -exec mv {} {}".txt" \;
There are several ways. Here are three:
rename 's/$/.txt/' ??? # Might be prename on some systems
for f in ???; do mv "$f" "$f.txt"; done
find -maxdepth 1 -type f -exec mv {} '{}.txt' \;