Charles Nadeau
2003-Dec-15 10:18 UTC
Rsyncing Windows directory to a Linux box: problem with spaces in directory names
Hello, I am trying to rsync folders/files hosted on a Windows machine to a Linux machine. Many of the directory names have spaces in them. How can I list them in a file so that the --include-from option use them correctly? Thanks! Charles -- Charles-E. Nadeau Ph.D http://radio.weblogs.com/0111823/
Mike
2003-Dec-16 23:35 UTC
Rsyncing Windows directory to a Linux box: problem with spaces in directory names
Charles Nadeau wrote:> Hello, > > I am trying to rsync folders/files hosted on a Windows machine to a > Linux machine. Many of the directory names have spaces in them. > How can I list them in a file so that the --include-from option use > them correctly? > Thanks! > > Charlestry\ escaping\ the\ spaces\ like\ this "or perhaps quoting" Mike
Max Kipness
2003-Dec-16 23:51 UTC
Rsyncing Windows directory to a Linux box: problem with spaces in directory names
> > I am trying to rsync folders/files hosted on a Windows machine to a > > Linux machine. Many of the directory names have spaces in them. > > How can I list them in a file so that the --include-from option use > > them correctly? > > Thanks! > > > > Charles > > try\ escaping\ the\ spaces\ like\ this > "or perhaps quoting"I just include them with the spaces and it works fine. This is with Redhat 8 or 9. Max
Charles Nadeau
2003-Dec-17 01:47 UTC
Rsyncing Windows directory to a Linux box: problem with spaces in directory names
Mike wrote:> Charles Nadeau wrote: >> Hello, >> >> I am trying to rsync folders/files hosted on a Windows machine to a >> Linux machine. Many of the directory names have spaces in them. >> How can I list them in a file so that the --include-from option use >> them correctly? >> Thanks! >> >> Charles > > try\ escaping\ the\ spaces\ like\ thisMike, I tried and I got: building file list ... link_stat /diskbox/Anciens\ : No such file or directory link_stat projets : No such file or directory done IO error encountered - skipping file deletion ./> "or perhaps quoting"I tried and I got: building file list ... link_stat "/diskbox/Anciens : No such file or directory link_stat projets" : No such file or directory done IO error encountered - skipping file deletion ./ I tried with both and got: building file list ... link_stat "/diskbox/Anciens\ : No such file or directory link_stat projets" : No such file or directory done IO error encountered - skipping file deletion ./ Thanks for your advise!> > Mike > >-- Charles-E. Nadeau Ph.D http://radio.weblogs.com/0111823/
Charles Nadeau
2003-Dec-17 11:05 UTC
Rsyncing Windows directory to a Linux box: problem with spaces in directory names
Max Kipness wrote:>> > I am trying to rsync folders/files hosted on a Windows machine to a >> > Linux machine. Many of the directory names have spaces in them. >> > How can I list them in a file so that the --include-from option use >> > them correctly? >> > Thanks! >> > >> > Charles >> >> try\ escaping\ the\ spaces\ like\ this >> "or perhaps quoting" > > I just include them with the spaces and it works fine. This is with > Redhat 8 or 9.Max, Here are more details on the problem. The complete script I am using can be found there: http://www.mikerubel.org/computers/rsync_snapshots/contributed/rob_bos. The command from this script that cause me problem is: rsync -va --delete --modify-window=2 --delete-excluded --exclude-from=$excludefile $backup $backuproot/$type.1/ Where: $backup=`cat /etc/snapshot/include.text` $backuproot=/backup $excludefile=/etc/snapshot/exclude.text $type=hourly /etc/snapshot/include.text contains: /diskbox/Mariage/*.tdk /diskbox/Mariage/*.ppj /diskbox/Outlook/ /diskbox/PourCD/ /diskbox/Toburn/ /diskbox/Anciens projets/ /etc/snapshot/exclude.text contains: diskbox/Mariage/*.AVI diskbox/Mariage/*.wmv diskbox/Mariage/*.rm diskbox/Mariage/*.mp2 diskbox/Outlook/Outlook/*.* When I execute the script above with a directory name containing space in include.text, I get the following error message: building file list ... link_stat /diskbox/Anciens : No such file or directory link_stat projets/. : No such file or directory done IO error encountered - skipping file deletion ./ Anything I could do besides trying to escape the space or putting the whole directory between double quote? Thanks! Charles> > Max-- Charles-E. Nadeau Ph.D http://radio.weblogs.com/0111823/
jw schultz
2003-Dec-17 13:16 UTC
Rsyncing Windows directory to a Linux box: problem with spaces in directory names
On Wed, Dec 17, 2003 at 09:05:50AM +0900, Charles Nadeau wrote:> Max Kipness wrote: > > >> > I am trying to rsync folders/files hosted on a Windows machine to a > >> > Linux machine. Many of the directory names have spaces in them. > >> > How can I list them in a file so that the --include-from option use > >> > them correctly? > >> > Thanks! > >> > > >> > Charles > >> > >> try\ escaping\ the\ spaces\ like\ this > >> "or perhaps quoting" > > > > I just include them with the spaces and it works fine. This is with > > Redhat 8 or 9. > > Max, > > Here are more details on the problem. > > The complete script I am using can be found there: > http://www.mikerubel.org/computers/rsync_snapshots/contributed/rob_bos. The > command from this script that cause me problem is: rsync -va --delete > --modify-window=2 --delete-excluded > --exclude-from=$excludefile $backup $backuproot/$type.1/ > > Where: > $backup=`cat /etc/snapshot/include.text` > $backuproot=/backup > $excludefile=/etc/snapshot/exclude.text > $type=hourly > > /etc/snapshot/include.text contains: > /diskbox/Mariage/*.tdk > /diskbox/Mariage/*.ppj > /diskbox/Outlook/ > /diskbox/PourCD/ > /diskbox/Toburn/ > /diskbox/Anciens projets/ > > /etc/snapshot/exclude.text contains: > diskbox/Mariage/*.AVI > diskbox/Mariage/*.wmv > diskbox/Mariage/*.rm > diskbox/Mariage/*.mp2 > diskbox/Outlook/Outlook/*.* > > When I execute the script above with a directory name containing space in > include.text, I get the following error message: > > building file list ... link_stat /diskbox/Anciens : No such file or > directory > link_stat projets/. : No such file or directory > done > IO error encountered - skipping file deletion > ./ > > Anything I could do besides trying to escape the space or putting the whole > directory between double quote? > Thanks!Move up one level. Instead of $backup being a list of directories in /diskbox back up /diskbox rsync -va --delete --modify-window=2 --delete-excluded \ --exclude-from=$excludefile /diskbox $backuproot/$type.1/ and have the exclude.text narrow the file list ala: + /Mariage/ + /Mariage/*.tdk + /Mariage/*.ppj - /Mariage/*/ + /Outlook/ + /PourCD/ + /Toburn/ + /Anciens projets/ - /* /Mariage/*.AVI /Mariage/*.wmv /Mariage/*.rm /Mariage/*.mp2 /Outlook/Outlook/*.* -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: jw@pegasys.ws Remember Cernan and Schmitt
Maybe Matching Threads
- Rsyncing Windows directory to a Linux box: problem with spacesin directory names
- Equivalent between rsync -aHr and cp -al
- [EXTERNAL] Re: Submitting a patch that exposes VAD voiced/unvoiced signal type
- Rsync sometimes decides to delete all data
- query_name_response: Multiple (2)