の名前を変更コピーして、次のように私が構造を持っているresursively
./en-us/sitemap.html to ./en-us/psitemap.html
./en-es/sitemap.html to ./en-es/psitemap.html
I試みたfind
とexec
のバリエーションが、運がない。ここで
find . -type f -name "sitemap.html" -printf "cp %p %p \n" | sed 's/sitemap.html$/psitemap.html\1/g'
私はpsitemap.htmlで最後sitemap.htmlのを交換しようとして失敗しました。
これらのファイルを簡単にコピーして名前を変更するにはどうすればよいですか?
'-execdir'をうまく使います! – hek2mgl
完全にはっきりしているわけではありませんが、OPの名前を変更するだけでなく、新しい名前でOPをコピーしたかったようです。 –