I'm trying to rename some files on my Synology Diskstation via SSH. The available shell is the BusyBox built-in shell:
BusyBox v1.16.1 (2013-04-16 20:13:10 CST) built-in shell (ash)
The move command always yields two errors when I try using a space character either in the source or destination filename. Escaping space characters or quoting the filename seems to have no effect.
Example for renaming a file with a space character in the destination:
/volumeUSB1/usbshare/directory $ touch test
/volumeUSB1/usbshare/directory $ ls
test
/volumeUSB1/usbshare/directory $ mv test 'te st'
mv: can't rename 'test': No such file or directory
mv: can't rename 'te': No such file or directory
/volumeUSB1/usbshare/directory $ mv test te\ st
mv: can't rename 'test': No such file or directory
mv: can't rename 'te': No such file or directory
Renaming a file with a space character in the source yields similar results:
/volumeUSB1/usbshare/directory $ touch 'te st'
/volumeUSB1/usbshare/directory $ ls
te st
/volumeUSB1/usbshare/directory $ mv 'te st' test
mv: can't rename 'te': No such file or directory
mv: can't rename 'st': No such file or directory
/volumeUSB1/usbshare/directory $ mv te\ st test
mv: can't rename 'te': No such file or directory
mv: can't rename 'st': No such file or directory
type mv returns mv is /bin/mv. The file command is not available on my machine. cat /bin/mv revealed that it's a small script that ends with calling /bin/busybox mv $@.
Where is my mistake?