Filenames with blanks

tim.conway at tim.conway at
Fri Aug 23 13:34:01 EST 2002

The output of the file list is treated as a list.  The easiest solution 
would be to iterate through the list.
Now, you understand that as you have constructed this, you create a 
commandline in a variable.  In the "$COM" you are executing that 
commandline, and putting its contents as a part of the $src_host: token. 
The find is NOT being executed on the remote, so what you are doing is 
asking the remote for its copy of each file you have a file in $src_dir 
that is less than $days old.  Is that actually what you want?

A better solution to the spaces problem is
find $srcdir -print |
grep ' ' |
while read item
    mv $item `echo $item |tr ' ' _`

Yeah, I know you CAN have spaces in filenames, but it's such a pain in the 
ass, just to satisfy some luser who wants to use them.

Tim Conway
tim.conway at
303.682.4917 office, 303.921.0301 cell
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, caesupport2 on AIM
"There are some who call me.... Tim?"

Ivan Kovalev <ivan at>
Sent by: rsync-admin at
08/23/2002 04:09 PM

        To:     rsync at
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        Filenames with blanks

Command like this:
    rsync  -rxlupogtSvve ssh
$src_host:"/home/wss_disk/'Conference Calls'" $targ_dir
works fine with blanks embeded in the file name.
When I try to script it like this:
    COM='`find '$src_dir'  -mtime -'$days' -type f `'
    rsync  -rxlupogtSvve ssh  $src_host:"$COM" $targ_dir
works fine on regular filenames, but does not see the ones with blanks
in the middle.

I changed my COM to pipe through little script to produce the same
output where either the whole filepath or just the file name will be
quoted (as in the first example). That breakes it complitely and this
version does not work even for single word files. Output looks like
receiving file list ...
link_stat /home/wss_disk/'Conference : No such file or
link_stat Calls' : No such file or directory
link_stat /home/wss_disk/'Economic' : No such file or

I probably am missing something simple, but could not figure what is it.
Please advise. Thank you.
Ivan Kovalev
Wall Street Source
120 Broadway, 27-th floor
New York, NY 10271
Pager: ikovalev at, (888)688-5202
Phone: (212)479-1445
E-mail: ivan at

To unsubscribe or change options:
Before posting, read:

More information about the rsync mailing list