Parallel --retries使用上的問題 - Linux
By Una
at 2021-05-21T13:08
at 2021-05-21T13:08
Table of Contents
大家好,小弟最近因為需要複製個很多目錄跟檔案的project,
覺得只用cp -r速度太慢,因此想用parallel的方式複製,
但用find xxx很麻煩需要先建目錄再copy檔案,
如果各位大大有更好的方式再麻煩指導一下。
我現在遇到的問題是,我用parallel的方式去mkdir,
路徑大概是這樣
source_dir-projname-folder1-folder11-folder111
-folder12-folder122
指令如下:
cd source_dir
find projname -type d | parallel -j32 -retries 99 mkdir -v dest_dir/{}
我已經有加上retries了,應該如果他先建folder11
而此時folder1還沒建就會出現error,
預期加上retries應該會再重試,但似乎沒用,
我加到99了還是會出現像這樣的錯誤,
mkdir: created directory '/dest_dir/projname/folder1'
mkdir: cannot create directory ‘/dest_dir/projname/folder11/folder111’: No
such file or directory
mkdir: cannot create directory ‘/dest_dir/projname/folder12/folder122’: No
such file or directory
mkdir: created directory '/dest_dir/projname/folder11'
想問一下各位大大這個是否有什麼解快方式?感謝各位大大收看以及指導。
--
覺得只用cp -r速度太慢,因此想用parallel的方式複製,
但用find xxx很麻煩需要先建目錄再copy檔案,
如果各位大大有更好的方式再麻煩指導一下。
我現在遇到的問題是,我用parallel的方式去mkdir,
路徑大概是這樣
source_dir-projname-folder1-folder11-folder111
-folder12-folder122
指令如下:
cd source_dir
find projname -type d | parallel -j32 -retries 99 mkdir -v dest_dir/{}
我已經有加上retries了,應該如果他先建folder11
而此時folder1還沒建就會出現error,
預期加上retries應該會再重試,但似乎沒用,
我加到99了還是會出現像這樣的錯誤,
mkdir: created directory '/dest_dir/projname/folder1'
mkdir: cannot create directory ‘/dest_dir/projname/folder11/folder111’: No
such file or directory
mkdir: cannot create directory ‘/dest_dir/projname/folder12/folder122’: No
such file or directory
mkdir: created directory '/dest_dir/projname/folder11'
想問一下各位大大這個是否有什麼解快方式?感謝各位大大收看以及指導。
--
Tags:
Linux
All Comments
By Harry
at 2021-05-24T16:41
at 2021-05-24T16:41
By Eden
at 2021-05-28T10:57
at 2021-05-28T10:57
By Doris
at 2021-06-01T17:26
at 2021-06-01T17:26
By Andrew
at 2021-06-06T05:35
at 2021-06-06T05:35
By Enid
at 2021-06-08T12:03
at 2021-06-08T12:03
By Anthony
at 2021-06-09T19:00
at 2021-06-09T19:00
By Lily
at 2021-06-13T20:36
at 2021-06-13T20:36
By Cara
at 2021-06-18T11:43
at 2021-06-18T11:43
By Anonymous
at 2021-06-19T05:28
at 2021-06-19T05:28
By Sierra Rose
at 2021-06-22T16:59
at 2021-06-22T16:59
By Elvira
at 2021-06-26T17:14
at 2021-06-26T17:14
Related Posts
Nextcloud 如何從外部訪問
By Thomas
at 2021-05-19T23:06
at 2021-05-19T23:06
有關 /usr/src/linux-headers-*-generic
By Olivia
at 2021-05-19T22:43
at 2021-05-19T22:43
終於不用開VM報稅
By Olga
at 2021-05-15T09:40
at 2021-05-15T09:40
[已解決] gcin 輸入法吃鍵
By Madame
at 2021-05-14T13:21
at 2021-05-14T13:21
Gentoo第一次安裝時間分享
By Caitlin
at 2021-05-13T05:54
at 2021-05-13T05:54