我无法将日志文件从 ec2 实例复制到我的本地计算机(Windows)。我正在使用的命令
scp -i ~/Desktop/Repo/mypemfile.pem [email protected]:/logfilelocation/fileName.log ~/Documents/Test.log
我遇到的错误
~/Documents/Test.log: No such file or directory
卡在这个请帮忙
似乎在说
~/Documents/Test.log
不是有效的 目录 名称。
我查看了文档,似乎目的地需要是不带文件名的路径名。所以,尝试下载:
scp -i ~/Desktop/Repo/mypemfile.pem [email protected]:/logfilelocation/fileName.log ~/Documents/
然后您需要在本地重命名该文件。