Spaces in filenames?

Daniel Dalton d.dalton at
Thu Feb 21 10:45:00 UTC 2008

On Wed, 20 Feb 2008, Hart Larry wrote:

> I would think you would need to have quotes beginning before the first space, 
> but really you might find a script to change those spaces to dashes.

You can use a \  to mean a space. That's
"\ "

And this command will change all spaces in file names to -...
(its recursivly too.)
find directory-destination -type f -exec rename 's/\ /-/g' '{}' +
And change -type f to -type d for directories.

Don't ask me how it works.
I don't know.


Daniel Dalton
d.dalton at

More information about the Blinux-list mailing list