Hi All, I'm new to rsync usage in Mac OS X. I'm having a strange issue with -- files-from option. I'm providing the --files-from to provide a file , which contains the list of files separated by newline character , to perform backup operation. Especially in Mac OS X , particular tiff bundle files are having \r as part of the filename.When rsync reads the filepaths using delimiter \r.Hence my filename is split into 2 strings and finally getting No Such file or directory error. Is there any way i can specify the custom delimiter to rsync to read the file names. Please help me to solve this. Thanks in Advance. JanakiRam.
Matt McCutchen
2008-May-18 02:47 UTC
rsync --files-from option file with a custom Delimiter
On Sun, 2008-05-18 at 02:35 +0000, JanakiRam wrote:> I'm new to rsync usage in Mac OS X. I'm having a strange issue with -- > files-from option. > > I'm providing the --files-from to provide a file , which contains the > list of files separated by newline character , to perform backup > operation. Especially in Mac OS X , particular tiff bundle files are > having \r as part of the filename.When rsync reads the filepaths using > delimiter \r.Hence my filename is split into 2 strings and finally > getting No Such file or directory error. > > Is there any way i can specify the custom delimiter to rsync to read > the file names. Please help me to solve this.You can use a null byte ('\0') as the delimiter if you pass --from0 . Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20080517/1d576f0f/attachment.bin
Matt McCutchen
2008-May-19 22:44 UTC
rsync --files-from option file with a custom Delimiter
?JanakiRam, please CC the rsync list in replies so that your messages are archived and others can help you. ??On Mon, 2008-05-19 at 02:34 -0700, JanakiRam wrote:> ?> > Is there any way i can specify the custom delimiter to rsync to read > > > the file names. Please help me to solve this. > > > > You can use a null byte ('\0') as the delimiter if you pass --from0 .> I'm new to rsync and its usage , Can you please provide an example/ > pointers/links for such usage.You could use tr to convert your existing newline-separated file list (let LIST represent its name) to a null-separated one to pass to rsync: tr '\n' '\0' <LIST | rsync --files-from=- --from0 ... Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20080519/3a81340d/attachment.bin