0
我得到Couldn't canonicalise: No such file or directory
錯誤,同時使用sftp獲取單個文件。 這裏是我在做什麼,無法canonicalise:沒有這樣的文件或目錄
#!/bin/ksh
. /feeds/scripts/files.properties
filename=$1.txt
echo $filename
sftp [email protected]$getserver <<EOF>> $logfile
cd /feeds/out/data/
lcd /feeds/files/
get $filename
bye
EOF
我能夠打印/回聲文件名,但在執行腳本我得到以下錯誤,
user:/feeds/scripts> ./fileReceiver.sh sample
sample.txt
Connecting to xxxxx.xxx.xxx...
Couldn't canonicalise: No such file or directory
Couldn't stat remote file: No such file or directory
File "/u/user/sample.txt" not found.
我不知道爲什麼它增加'/ u/user'在文件名之前。任何人都可以幫忙嗎? 在此先感謝。
[This](http://unix.stackexchange.com/questions/7004/uploading-directories-with-sftp)可能會有所幫助。 – devnull
解決!, 我很抱歉,我的錯誤。在屬性文件中,我提到了錯誤的服務器名稱。服務器名稱看起來非常相似,所以無法弄清楚。 不管怎麼說,謝謝@devnull,我經歷了它,它很有用。 –