我想创建 shell 脚本来调用特定文件的 tftp 传输到我的本地机器
这是我想做的操作
tftp 172.2.22.2
get file1_in_remote location file2_in_local_machine
quit
但我无法让它工作,因为当第一个 tftp 命令执行时,控件将进入 tftp 提示符。它看起来像这样
tftp>
它不会接受我在 shell 脚本中给出的第二个和第三个命令。
但是当我退出 tftp 提示符时,bash 会打印一条错误消息,如
get: command not found
quit: command not found
那么我怎样才能完成它
编辑 1:
tftp 173.32.52.12 -c get MyFile1.txt MyFile2.txt
tftp 173.32.52.12 -c get MyFile1.txt MyFile2.txt MyFile3.txt etc. etc.
这两个命令不适用于我的 ubuntu(14.0.4) 系统
最佳答案
你可以使用 atftp
安装:
sudo apt-get install atftp
使用:
atftp 172.2.22.2 -g -r /remote/file.txt -l /tmp/local.txt
关于shell - 创建一个 bash 文件用于通过 tftp 传输文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36176277/