Renaming a whole bunch of files at once, in bash
December 12, 2010 1:08 PM Subscribe
Please help me rename ~1300 image files in bash, en masse.
posted by Asparagirl to computers & internet (8 answers total) 7 users marked this as a favorite
I have a long list of files that are named like this:
As you can see, there is a space between the "5723" and the "a." in those names. I would like to replace that space with an underscore character so that the filenames end up like this:
This needs to be done in bash on a shared web hosting environment, so I can't install any fancy tools to assist me. I'm sure there is a simple regular expression to handle something like this, but I don't know how to construct it. My geek-fu is not strong enough. Please help?