how to convert one file extension to another in a single command line in linux?
i want to convert *.html to *.php recursively and retain the original file.
Printable View
how to convert one file extension to another in a single command line in linux?
i want to convert *.html to *.php recursively and retain the original file.
Well, one way, perhaps not the most elegant:I'm pretty sure something better is possible in zsh with regular expressions, but it's too early for the man pages to make sense. :pCode:find -iname '*.php' /top/directory -exec cp {} `dirname {}`/`basename {} .php`.html \;