remove single quote from all directory and file names

Eli asked:

I ran a sed command recently and I mistyped the command (yes it happens).

So now i have directory and file names that look like 'Call of Duty'. How can I recursively go back and rename all files and directories to remove the '?

this is the command i ran find . -type f -name "*.css" -exec sed -i'' -e 's|http://cdn|//cdn|g' {} +

My answer:


Are you sure that that is actually the filename? On recent Linux distributions ls displays filenames with spaces in quotes by default. Try ls -N to be sure.

From the man page:

       -N, --literal
              print entry names without quoting

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.