问题
I have a database transfer script, which uses bzip2 to minimise locking of large databases on a server.
First line is
ssh root@server "mysqldump db | bzip2 >/root/db.sql.bz2"
This works on many servers, but on a new Ubuntu 14.04 server the file created on the server has a question mark appended:
ls -la gt*
-rw-r--r-- 1 root root 2364190 Nov 21 00:25 db.sql.bz2?
Any idea why this may be happening?
回答1:
Does your script have CR+LF line-endings? Make sure to use Unix (LF) line endings.
来源:https://stackoverflow.com/questions/27052212/ssh-multiple-commands-appends-question-mark-to-file-name