新手cp指令問題 - Linux

Table of Contents




我有一個 aaa.php的檔案
我要用這個檔案同時置換掉

/home/aaa1/store/aaa.php
/home/bbb1/store/aaa.php
/home/ccc1/store/aaa.php

這些資料夾裡的 aaa.php檔 要怎麼下指令 ?

cp -a aaa.php /home/*/store/

這樣對嗎 試過好像有奇怪的問題 而且不會自動幫我答yes -f也沒用


--

All Comments

Elvira avatarElvira2012-05-27
find /home -name 'store' -exec cp aaa.php {} \;