View previous topic :: View next topic |
Author |
Message |
mambro l33t
Joined: 22 Mar 2004 Posts: 752 Location: Mira (VE) - Italy
|
Posted: Wed Nov 14, 2007 7:30 pm Post subject: rsync non esclude quello che dico io [risolto] |
|
|
Scusate, probabilmente alla fine si rivelerà una cretinata ma è un po' che ci perdo tempo..
Demo syncare 2 directory e voglio escludere una directory.
Situazione iniziale
Code: |
mambro@marte ~ $ ls -la ~/provasync/orig
totale 12
drwxr-xr-x 3 mambro mambro 4096 14 nov 20:23 .
drwxr-xr-x 4 mambro mambro 4096 14 nov 20:14 ..
-rw-r--r-- 1 mambro mambro 0 14 nov 20:14 bbb
drwxr-xr-x 2 mambro mambro 4096 14 nov 20:17 escludere
mambro@marte ~ $ ls -la ~/provasync/dest
totale 8
drwxr-xr-x 2 mambro mambro 4096 14 nov 20:23 .
drwxr-xr-x 4 mambro mambro 4096 14 nov 20:14 ..
|
faccio andare rsync e voglio che la directory "escludere" venga esclusa
Code: |
mambro@marte ~ $ rsync -av --exclude=~/provasync/orig/escludere /home/mambro/provasync/orig/ /home/mambro/provasync/dest/
building file list ... done
./
bbb
escludere/
sent 168 bytes received 54 bytes 444.00 bytes/sec
total size is 0 speedup is 0.00
|
Mi copia anche la directory "escludere" che non volevo
infatti:
Code: |
mambro@marte ~ $ ls -la ~/provasync/dest
totale 12
drwxr-xr-x 3 mambro mambro 4096 14 nov 20:23 .
drwxr-xr-x 4 mambro mambro 4096 14 nov 20:14 ..
-rw-r--r-- 1 mambro mambro 0 14 nov 20:14 bbb
drwxr-xr-x 2 mambro mambro 4096 14 nov 20:17 escludere
|
Cosa sbaglio? _________________ "The design of a worldwide, fully transparent distributed file system for simultaneous use by millions of mobile and frequently disconnected users is left as an excercise for the reader".
Andrew S. Tanenbaum, Distributed Operating Systems.
Last edited by mambro on Wed Nov 14, 2007 8:02 pm; edited 1 time in total |
|
Back to top |
|
|
Scen Retired Dev
Joined: 29 Jul 2003 Posts: 2470 Location: Padova, Italy
|
Posted: Wed Nov 14, 2007 7:47 pm Post subject: |
|
|
Perchè rsync considera le directory assumendo come "root" la directory di origine.
Prova con
Code: |
rsync -av --exclude=escludere/ /home/mambro/provasync/orig/ /home/mambro/provasync/dest/
|
_________________ I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny |
|
Back to top |
|
|
mambro l33t
Joined: 22 Mar 2004 Posts: 752 Location: Mira (VE) - Italy
|
Posted: Wed Nov 14, 2007 8:02 pm Post subject: |
|
|
Scen wrote: | Perchè rsync considera le directory assumendo come "root" la directory di origine.
Prova con
Code: |
rsync -av --exclude=escludere/ /home/mambro/provasync/orig/ /home/mambro/provasync/dest/
|
|
Quanto hai ragione!!!
Graizie mille, ci avevo perso le speranze ormai _________________ "The design of a worldwide, fully transparent distributed file system for simultaneous use by millions of mobile and frequently disconnected users is left as an excercise for the reader".
Andrew S. Tanenbaum, Distributed Operating Systems. |
|
Back to top |
|
|
|