Is there any way on a linux box to move every file in a directory into their own sub directory (i.e. make a directory named after it and move it in)?
Try this snippet, assuming all you've got in the currently directory is files (no directories):
Otherwise (tested only lightly):
This worked on my test directory with a couple of arbitrarily named files, some of them with spaces.