Changing file extensions 
Possible Duplicate:
Renaming multiple files (changing extension) 

Suppose I have a bunch of files with the extension .x and I want to change them so that they have the extension .y. I know $ mv *.x *.y wouldn't work because I havn't expressed each file to change their respective extensions (that and the command expects *.y to be a directory).
What command should I issue?

You can use rename to rename files based on a pattern, and one of the examples from the man page is changing the extension of a group of files. It takes the source pattern, modified pattern, and the files to operate on, so in your case:
$ rename .x .y *.x

It changes the first occurrence of .x to .y, so if you happen to have .x anywhere other than the end of the filename it's going to change that first