不同操作系统下的tftp指令
tftp指令windows 操作系统可以使用自带的tftp软件作为tftp客户端向tftp服务器发送或者接收文件。可以使用tftpd64这个软件搭建tftp服务器。mac 的tftp服务器指令# 启动tftpsudolaunchctl load-F/System/Library/LaunchDaemons/tftp.plistsudolaunchctl start com.apple.tftpd# 关闭tftpsudolaunchctl unload-F/System/Library/LaunchDaemons/tftp.plistsudolaunchctl stop com.apple.tftpd# 查看tftp服务器是否启动netstat-na|grep\*.69/System/Library/LaunchDaemons/tftp.plist配置文件以下配置,可按需修改。arraystring/usr/libexec/tftpd/stringstring-i/stringstring-l/stringstring/private/tftpboot/string/array-i表示开启不安全模式-l表示使用syslog记录所有请求的日志/private/tftpboot则是默认共享目录tftp172.18.25.8-cput test.txt out/test1.txtlinux的tftp服务器指令配置文件# /etc/default/tftpd-hpaTFTP_USERNAMEtftpTFTP_DIRECTORY/srv/tftpTFTP_ADDRESS0.0.0.0:69TFTP_OPTIONS--secure --create --verboseRUN_DAEMONyesTFTP_OPTIONS关键选项:--secure: 限制客户端只能访问TFTP_DIRECTORY目录必须启用。--create: 允许客户端上传文件默认禁用。--verbose: 输出详细日志调试时建议启用。--ipv4/--ipv6: 强制使用 IPv4/IPv6。--blocksize size: 设置传输块大小默认 512最大 65464。--retransmit timeout: 设置重传超时单位毫秒。