tftp文件传输

您所在的位置:网站首页 tftp传送文件命令 tftp文件传输

tftp文件传输

#tftp文件传输| 来源: 网络整理| 查看: 265

tftp文件传输 一、参数说明:

-l 是local的缩写,后跟存在于Client的源文件名,或下载Client后 重命名的文件名。 -r 是remote的缩写,后跟Server即PC机tftp服务器根目录中的源文 件名,或上传Server后 重命名后的文件名。 -g 是get的缩写,下载文件时用, -p 是put的缩写,上传文件时用, tftp 默认占用的是69端口。

二、更名下载或上传

tftp的命令格式: tftp –g/-p 目标文件名 源文件名 服务器地址 在这里插入图片描述

1)从Server下载文件到Client: tftp –g –l 目标文件名 –r 源文件名 服务器地址 如命令 tftp –g –l B.txt –r A.txt 192.168.1.2

的作用是从server中的tftp根目录下,下载文件A.txt到Client并更名为B.txt; 若不更名,B.txt就改为A.txt.

2)从Clinet上传文件到Server 使用下面的命令: tftp –p –r 目标文件名 -l 源文件名 服务器地址 eg: tftp –p –r D.txt –l C.txt 192.168.1.2

的作用是从Client上传文件C.txt到Server的tftp根目标下,并更名为D.txt;若不更名,D.txt就改为C.txt.

这个命令一般是用于下载或上传后进行更改文件名,如若不更改文件名,可使用以下简单命令

三、不更名下载或上传

不更名下载命令: tftp –g –l/-r 源文件名 服务器地址 此时参数-l与-r等效,使用时只使用其中一个); 如tftp –g –l A.txt 192.168.1.2或 tftp –g –r A.txt 192.168.1.2 作用相同,都表示Client从Server下载文件A.txt,且不更名。

不更名上传命令: tftp –p –l/-r 源文件名 服务器地址 (此时参数-l与-r等效,使用时只使用其中一个);

如tftp –p –l B.txt 192.168.1.2或 tftp -p –r B.txt 192.168.1.2

作用相同,都表示从Client上传文件B.txt到Server,且不更名。

四、完整示例 下载tftpd32打开tftp32,server interfaces选择本地ip,如:192.168.1.110在盒子/Linux系统终端输入: a. 从windows上传东西到linux:tftp -g -l/-r 文件 目标ip地址(即windows下的ip); b.从linux上传东西到windows:tftp -p -l 文件 目标ip地址(同上);

注释:-r 远程;-l 本地;-g:获取;-p:传送;

console:/vendor # mount -o remount,rw /vendor console:/vendor # console:/vendor # ls app default.prop framework overlay ueventd.rc bin etc lib package_config usr build.prop firmware lost+found priv-app xbin console:/vendor # cp ueventd.rc ueventd.rc2 console:/vendor # ls app default.prop framework overlay ueventd.rc xbin bin etc lib package_config ueventd.rc2 build.prop firmware lost+found priv-app usr console:/vendor # tftp -l u -p 192.168.1.110 ueventd.rc ueventd.rc2 usr/ console:/vendor # tftp -l uev -p 192.168.1.110 ueventd.rc ueventd.rc2 console:/vendor # tftp -p -l ueventd.rc 192.168.1.110 console:/vendor # tftp -g -l HidAudio.apk 192.168.1.110



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3