UNIX quesiton about find and exec

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ammo325
    Confirmed User
    • Jan 2001
    • 467

    #1

    UNIX quesiton about find and exec

    I have a question, I am trying to copy multiple files (with the same name) in to their own directories (multiple directories) while changing the name of the destination file. This is what I have so far:
    find /home/sites/lostbush.com/htdocs/babes/*/ -name "lot.html" -exec cp {} lota.html \;


    The problem is that this command copies a file with the new name into the directory it is launched from, not from the same directory as the files analyzed in the find query. Does any one have a solution to this?
    Submit to Lostbush
Working...