View Single Post
Old 09-19-2005, 06:33 AM  
ammo325
Confirmed User
 
Join Date: Jan 2001
Location: LV Nev
Posts: 467
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
ammo325 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote