Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rsync non esclude quello che dico io [risolto]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
mambro
l33t
l33t


Joined: 22 Mar 2004
Posts: 752
Location: Mira (VE) - Italy

PostPosted: Wed Nov 14, 2007 7:30 pm    Post subject: rsync non esclude quello che dico io [risolto] Reply with quote

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 :cry:
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
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Wed Nov 14, 2007 7:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
mambro
l33t
l33t


Joined: 22 Mar 2004
Posts: 752
Location: Mira (VE) - Italy

PostPosted: Wed Nov 14, 2007 8:02 pm    Post subject: Reply with quote

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 :D
_________________
"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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum