→ prismwu:cp --parents 07/09 13:27
我有A跟B兩個資料夾
裡面有很多檔案,還有子目錄
我想要把A跟B裡相同的檔案都取出來放在一個叫common的資料夾裡
請問該怎麼做?
由於這兩個資料夾是embedded system的rootfs
裡面有busybox建立的soft link
我有試著用find -type l先把soft link找出來,然後手動比較之後找出common的部分
結果我用
for i in `cat common.txt`
do
cp a/$i common -a
done
他把全部的檔案都copy進同一個資料夾,沒有照子目錄分類...
這有什麼辦法嗎?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.135.113.202
※ 文章網址: http://www.ptt.cc/bbs/Linux/M.1404872759.A.4E9.html