Need help solving this advanced FIND command

Hello Folks,

I am trying to create 2 find commands, one that renames all .htaccess files to .htaccess.orig and then one that renames files now named as .htaccess.orig back to .htaccess.

So far I have written a command to do the initial renaming but its the second one im having trouble with.

find /home/username/public_html -name '.htaccess' -exec mv '{}' '{}.orig' ';'

Any help would be great!

 

 

 

 

Top