rsync problem - space character in filename


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers rsync problem - space character in filename
# 1  
Old 07-04-2004
CPU & Memory rsync problem - space character in filename

I have a freebsd box with a smb connection to a Windows server - I use rsync to copy specific directories, and files, between the two.

The problem is the Windows box has files with space characters in their filenames and rsync fails to copy these. Reading the documentation of rsync it appears it uses the space character as a delimiter.

Has anyone solved this problem? Another person suggested I take the output generated from this script and use awk to recursively call cp "filename with space" location - problem is I am new to Unix and have no idea how I would do this.

Any thoughts (and especially examples) would be greatly appreciated.

Tom
# 2  
Old 07-04-2004
Can you post the command you're running to rsync these files? (And I'm assuming you're using rsync on FreeBSD and not one on Cygwin on Windows or something, but if I'm wrong post that too). I personally haven't encountered this problem using rsync from one type of UNIX box to another, so, assuming you're not using some strange switch, I'm wondering if there's some other problem causing this.
# 3  
Old 07-04-2004
Thanks dkaplowitz for your reply, here is the command I am executing.

Code:
/usr/local/bin/rsync -rz --delete-excluded --delete-after --include=subdir/ --exclude-from=/mnt/hosting/website/utility/mirror/excludeAll_CO.txt /mnt/hosting/website/SAB/ /mnt/hosting/website/data/SAB/sub/

Cheers.

Last edited by Yogesh Sawant; 12-10-2010 at 05:30 AM.. Reason: added code tags
# 4  
Old 09-24-2004
Try the archive mode (rsync -a) this should solve your problem.
Good luck
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Space in input filename with pipe

Hello, Normally below script works, could you please comment out what could be the reason of failure if there are spaces in input filename: script.sh #!/bin/bash cd /home/hts/.hts/tvh/ file="$1 $2 $3 $4" read -d $'\x04' name < "$file" /usr/bin/ffmpeg -i ""$name"" -vcodec copy -preset... (1 Reply)
Discussion started by: baris35
1 Replies

2. Shell Programming and Scripting

^M special character in Filename

Hi All, Special character ? is added in between filename. Am not able to figure our why this is happening. In my Development environment special characters are not present. This issue is happening in the higher environment. It would be helpful if somebody can tell what are the possible... (3 Replies)
Discussion started by: weknowd
3 Replies

3. Shell Programming and Scripting

Read character by character in line in which space is also included

Hi friend, I have one file , and i want to read that file character by character. I need this script in ksh. while using read option with -n1 am getting error. while read -n1 c read has bad option And if i am using below script, then if in a line has space like this ( Pallvi mahajan)... (10 Replies)
Discussion started by: pallvi_mahajan
10 Replies

4. Shell Programming and Scripting

Finding a certain character in a filename and count the characters up to the certain character

Hello, I do have folders containing having funny strings in their names and one space. First, I do remove the funny strings and replace the space by an underscore. find . -name '* *' | while read file; do target=`echo "$file" | sed 's/... (2 Replies)
Discussion started by: tempestas
2 Replies

5. UNIX for Dummies Questions & Answers

Sed- Replace space in filename by a \

`echo $file | sed 's/ / /g'` Hey guys I want help in converting the spaces in my file names to '\ ' . Example: UK maps --> UK\ maps Could someone please help me. I have tried the following sequences already (none of them work): 1)s/ /\ /g 2)s/ /\\ /g 3)s/ /\\\ /g Can someone... (7 Replies)
Discussion started by: INNSAV1
7 Replies

6. UNIX for Dummies Questions & Answers

filename with white space

our user creates a text file with a white space on the filename. this same file is transfered to unix via automation tool. i have a korn shell script that reads these files on a input directory and connects to oracle database to run the oracle procedures which will load the data from each of the... (2 Replies)
Discussion started by: wtolentino
2 Replies

7. Shell Programming and Scripting

Remove last character from filename

Hi All, I have different type of file (.txt,.csv,.xml) format in my current directory. My requirement is that I need to remove the last character from the file format. Example count.txt$ csp_rules.csv^ Date.xml~ Need Output: count.txt csp_rules.csv Date.xml How to do that?.... (5 Replies)
Discussion started by: suresh01_apk
5 Replies

8. UNIX for Dummies Questions & Answers

Display last 8 character of filename

I would like to display the last 8 characters of the filenames for filenames of different lengths. I can delete the last 8 characters with sed but dont know how to only show the last 8 characters. The filenames are something like; afxH340800340000 afxH30800340021 afxR3080034002122 I... (3 Replies)
Discussion started by: Beanz
3 Replies

9. Shell Programming and Scripting

Filename character changes

I want to make a script for change filename's character not in English for a given directory. But I am not sure where am I starting from due to I am a little bit new user for scripts. At least is there anybody can help me to make first step ,how can I find illegal or unwanted characters in file... (5 Replies)
Discussion started by: xramm
5 Replies

10. UNIX for Dummies Questions & Answers

filename that starts with a space

I accidentally started a filename with a spce and I can not get rid of it. Any words of advice? (6 Replies)
Discussion started by: noobie_doo
6 Replies
Login or Register to Ask a Question