Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Running script creates filename with backslash r at the end

Featured Replies

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.

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).

Yep, what itimpi said. Or you can wrap the file paths in quotes, that should work too.

Open the file in Notepad, then delete the file. Create the file using VI over Telnet and copy & paste the contents in.

  • 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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.