find 的搬移方法 - Linux
By Carolina Franco
at 2011-03-31T13:19
at 2011-03-31T13:19
Table of Contents
※ 引述《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 找到的東西
--
Tags:
Linux
All Comments
By Selena
at 2011-04-05T03:41
at 2011-04-05T03:41
By Jake
at 2011-04-06T14:56
at 2011-04-06T14:56
By Jacob
at 2011-04-10T13:05
at 2011-04-10T13:05
By Margaret
at 2011-04-11T07:08
at 2011-04-11T07:08
By Daph Bay
at 2011-04-11T10:05
at 2011-04-11T10:05
By Charlotte
at 2011-04-15T22:48
at 2011-04-15T22:48
By Odelette
at 2011-04-17T00:27
at 2011-04-17T00:27
Related Posts
CallGraphviz – call graph visualzer
By Skylar DavisLinda
at 2011-03-31T10:08
at 2011-03-31T10:08
選購筆電希望安裝(CentOS)
By Hazel
at 2011-03-31T00:48
at 2011-03-31T00:48
選購筆電希望安裝(CentOS)
By Ethan
at 2011-03-30T15:37
at 2011-03-30T15:37
關於Grub的安裝問題
By Hazel
at 2011-03-30T14:53
at 2011-03-30T14:53
rsync 備份 /
By Olive
at 2011-03-30T14:45
at 2011-03-30T14:45