[Linux] when using rsync need to pay attention to small details

It is simple: before the end of the directory is a directory, and finally with whether /there is a difference.

Specific test to see:

. 1 # @ usr The PC- in ~ / cptest02 [ 2 : 28 : 02 ] 
 2  $ LL 
 . 3 the total amount of 0 
. 4  
. 5 # @ usr The PC- in ~ / cptest02 [ 2 : 28 : 03 ] 
 . 6 $ LL ../ cptest01 / 
 . 7 total amount . 4 
. 8 -rw-r---RW . 1 usr usr     0 Oct . 11  02 : 23 is 11111 File 
. 9 drwxrwxr-X 2 usr usr 4096 Oct11 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 is the total amount . 8 
42 is -rw-r---RW . 1 usr usr     0 10 dated . 11  02 : 23 is 11111 File 
43 is drwxrwxr-X . 3 usr usr 4096 10 dated . 11  02 : 23 is cptest01
 44 is drwxrwxr-X 2 usr usr 4096 dated 10 . 11  02 : 23 is pppp
 45  
46 is # @ usr The PC- in ~ / cptest02 [ 2 : 28 : 56 is ] 
 47 $ 

 

(shell是zsh。)

Guess you like

Origin www.cnblogs.com/senwren/p/rsync_attention_0.html