-
All replies
-
Helpful answers
-
Jul 16, 2014 9:49 AM in response to Matteo_999by Mark Jalbert,★HelpfulHave you read the manual?
1) If you are using the Apple provided rsync then use the -avE options
2) add --exclude=Icon?
3) add--exclude=Icon? --exclude=.DS_Store remove the E option
create an empty Icon? file->
touch Icon?
-
Jul 16, 2014 10:43 AM in response to Mark Jalbertby Matteo_999,In the second case, namely sync from the first folder all except to the icon of the principal folder, but including icons of the sub-folders, i write:
"rsync -avE --exclude=Icon? "$1/" "$2/"" but it syncs even the icon of the principal folder.
-
Jul 16, 2014 11:33 AM in response to Matteo_999by Mark Jalbert,★HelpfulIn the second case, namely sync from the first folder all except to the icon of the principal folder, but including icons....
That is not what you originally asked for. You need to read the manual. If you want the principal folder copied to the destination folder then you need to leave off the trailing "/" from both path arguments. The following is untested, use at your own risk, but should do what you are asking for now.
rsync -avE --exclude="$1/Icon?" "$1" "$2"
-
Jul 16, 2014 12:29 PM in response to Mark Jalbertby Matteo_999,Thank you for helping me, you have been very helpful until now, but about which manual are you talking about?
-
Jul 16, 2014 5:38 PM in response to Matteo_999by Tony T1,Matteo_999 wrote:
…but about which manual are you talking about?
In Terminal: man rsync
Also at: Mac OS X Manual Pages
rsync: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/rsync.1.html