Debian - command line. Replace () in filenames with _

Status
Not open for further replies.

AndroidApps

Active Member
326
2010
4
20
Hi,

I've got a set of directories like this:
files\
files\a
files\b
etc...
files\z
files\0

In these directories there might be files with the following characters: ()
I need those characters replaced by underscores: _

Someone gave me the following command:
Code:
find ./ -type f -exec sed -i 's/\(\)/_/' {} \;

But this only seems to do a search and not actually replace the filenames.
Would anyone be able to give me the proper command?
I suck at regex.. B-)
 
2 comments
Status
Not open for further replies.
Back
Top