很簡單:前一個目錄末尾是目錄的話,最後是否帶/是有區別的。 具體看測試: (shell是zsh。) ...
很簡單:前一個目錄末尾是目錄的話,最後是否帶/
是有區別的。
具體看測試:
1 # usr @ the-pc in ~/cptest02 [2:28:02] 2 $ ll 3 總用量 0 4 5 # usr @ the-pc in ~/cptest02 [2:28:03] 6 $ ll ../cptest01/ 7 總用量 4 8 -rw-rw-r-- 1 usr usr 0 10月 11 02:23 11111file 9 drwxrwxr-x 2 usr usr 4096 10月 11 02:23 pppp 10 11 # usr @ the-pc in ~/cptest02 [2:28:14] 12 $ rsync -av ../cptest01/ ./ 13 sending incremental file list 14 ./ 15 11111file 16 pppp/ 17 pppp/adadasd.file 18 19 sent 187 bytes received 57 bytes 488.00 bytes/sec 20 total size is 0 speedup is 0.00 21 22 # usr @ the-pc in ~/cptest02 [2:28:33] 23 $ ll 24 總用量 4 25 -rw-rw-r-- 1 usr usr 0 10月 11 02:23 11111file 26 drwxrwxr-x 2 usr usr 4096 10月 11 02:23 pppp 27 28 # usr @ the-pc in ~/cptest02 [2:28:46] 29 $ rsync -av ../cptest01 ./ 30 sending incremental file list 31 cptest01/ 32 cptest01/11111file 33 cptest01/pppp/ 34 cptest01/pppp/adadasd.file 35 36 sent 201 bytes received 58 bytes 518.00 bytes/sec 37 total size is 0 speedup is 0.00 38 39 # usr @ the-pc in ~/cptest02 [2:28:53] 40 $ ll 41 總用量 8 42 -rw-rw-r-- 1 usr usr 0 10月 11 02:23 11111file 43 drwxrwxr-x 3 usr usr 4096 10月 11 02:23 cptest01 44 drwxrwxr-x 2 usr usr 4096 10月 11 02:23 pppp 45 46 # usr @ the-pc in ~/cptest02 [2:28:56] 47 $
(shell是zsh。)