Renaming UNIX files for Windows

Christopher.Wood at Christopher.Wood at
Fri Apr 21 17:41:49 GMT 2006

Run this on your unix side first:

for file in yourlogfiles* ; do newfile=`echo $file | tr ':' '_'` ; mv
$file $newfile; done

Then copy the newfiles to your windows server. 

Alternatively, you could copy the newfiles to a temp dir

for file in file* ; do newfile=`echo $file | tr ':' '_'` ; cp $file
/tmp/$newfile; done


-----Original Message-----
From: at
[ at] On
Behalf Of Kevin Cook
Sent: Friday, April 21, 2006 1:18 PM
To: rsync at
Subject: Renaming UNIX files for Windows

I am a new rsync user and am running the client on Solaris and the
server on Windows 2000 Server utilizing Cygwin for the Linux emulation.
Unfortunately, the log files I am backing up frequently use a ':' for
date/time stamps; colons are supported in UNIX but not Windows.  Without
having to recode my application, is there an easy way to have rsync
eliminate the ':' or replace with an '_' during a backup?

To unsubscribe or change options:
Before posting, read:

More information about the rsync mailing list