November 16, 201411 yr I am running this script: date > /tmp/rsync.log rsync -ahv --stats --delete --log-format="%t %o %f %l %b" /mnt/user/HomeData/ rsync://192.168.1.132/mnt/user/HomeData >> /tmp/rsync.log date >> /tmp/rsync.log echo "-------------------------------------------------------------------" >> /tmp/rsync.log rsync -ahv --stats --delete --log-format="%t %o %f %l %b" /mnt/user/Media/ rsync://192.168.1.132/mnt/user/Media >> /tmp/rsync.log date >> /tmp/rsync.log echo "-------------------------------------------------------------------" >> /tmp/rsync.log rsync -ahv --stats --delete --log-format="%t %o %f %l %b" /mnt/user/Music/ rsync://192.168.1.132/mnt/user/Music >> /tmp/rsync.log date >> /tmp/rsync.log logger -f /tmp/rsync.log echo "rsync status from `hostname`" | mail -s "rsync stats" -a /tmp/rsync.log root The list line fails with file not found (/tmp/rsync.log). When I do list the /tmp directory, it shows a file named "rsync.log\r". If I attempt to do anything with the file, an error message says there is no such directory or file. I can list it if I use "ls rsync.log?". Does anyone have any idea why there is a special character being added to the end of the file name? I am running unraid 5.0-rc16c.
November 16, 201411 yr It sounds as if you created the script using a Windows text editor (which uses CR-LF as end-of-line)? You need to use one which understands Linux/unix end-of-lines (which are just LF).
November 16, 201411 yr Yep, what itimpi said. Or you can wrap the file paths in quotes, that should work too.
November 16, 201411 yr Open the file in Notepad, then delete the file. Create the file using VI over Telnet and copy & paste the contents in.
November 17, 201411 yr Author I used VIM on the script and specified "set list" to show special characters. There are no carriage returns, only line feeds ("$") at the end of each line. The script has been in use for several years without modification. The only change I have made recently was to install the latest unmenu version. I use PuTTY on windows to get into root on my unraid server. I tried copying the script from its file on windows to the clipboard, but I could not find any way to paste the text into a VIM session. Any other suggestions?
Archived
This topic is now archived and is closed to further replies.