Hi i'm a new user but rsync is easy and a great tool I have a folder caled source and a folder caled destini, like this + Source |_ FolderA |____ File1 |____ File2 + Destini I use this comando to sync only File 1 rsync -a Souce/FolderA/File1 Destini it's copy the File 1 to Destini but i would like who rsync create te Folder A in the destini and put the File 1 inside Then. I read many times the man but not find anything about it, it's possible, thanks for some help. By the way, i need to specify the name of file i want to copy i can't use rsync -r Souce Destini Becouse in the Source Folder exist some file if i didn't whant to copy. /** * [s] Anselmo Battisti * battisti.wordpress.com * ( Inform?tica ? Unioeste | Webgenium ) ? Cascavel ? Paran? ? Brasil ? Terra ? .. .. ? Web * Linux User : 415222 **/ Abra sua conta no Yahoo! Mail, o ?nico sem limite de espa?o para armazenamento! http://br.mail.yahoo.com/ -------------- next part -------------- HTML attachment scrubbed and removed
On Tue, Feb 19, 2008 at 03:14:52PM -0800, Anselmo Battisti wrote:> rsync -a Souce/FolderA/File1 Destini > it's copy the File 1 to Destini but i would like who rsync create te Folder A in the destini and put the File 1 inside Then.If you have a new enough rsync (at least 2.6.7), you can do this: rsync -aR Souce/./FolderA/File1 Destini The -R (--relative) option says that you want path information to be duplicated from the source files, and the "/./" dir is used to indicate where in the path the duplication should begin (with the default being the entire path if no "/./" dir is specified). If you have an older rsync, you need to chdir before the copy because it doesn't understand the "/./" dir idiom: chdir Souce rsync -aR FolderA/File1 ../Destini ..wayne..