How would you replace all occurrences of ‘hostname-a’ with ‘hostname-b’ in a file? In many files?

sed -e 's/hostname-a/hostname-b/g' -i filename