※ 引述《human45 (昨日小篤)》之銘言:
: ->aaa 沒搬過去,test2 反倒被嘗試搬過來 test1 底下....囧
: 我的想法是,exec mv 時的來源路徑應當是 regex 得到的路徑(./test1/aaa),
: 所以我後面是直接接目的路徑(./test2/)
: 請問我是哪邊搞錯了= =?
: 感謝!
順序錯了
find . -regex "\.\/test[12]\/a+" -exec mv {} test2/ +
說明: {} 是用來放 find 找到的東西
--
: ->aaa 沒搬過去,test2 反倒被嘗試搬過來 test1 底下....囧
: 我的想法是,exec mv 時的來源路徑應當是 regex 得到的路徑(./test1/aaa),
: 所以我後面是直接接目的路徑(./test2/)
: 請問我是哪邊搞錯了= =?
: 感謝!
順序錯了
find . -regex "\.\/test[12]\/a+" -exec mv {} test2/ +
說明: {} 是用來放 find 找到的東西
--
All Comments