tftp-hpa客户端使用说明
{get | put} [Source] [Destination]
参数
-i
指 定二进制图像传送模式(也称为八进制模式)。在二进制图像模式下,文件以一个字节为单位进行传输。在传送二进制文件时使用该模式。如果省略了 -i,文件将以 ASCII 模式传送。这是默认的传送模式。该模式将行尾 (EOL) 字符转换为指定计算机的适当格式。传送文本文件时使用该模式。如果文件传送成功,将显示数据传输率。
Host
指定本地或远程计算机。
put
将本地计算机上的 Destination文件 传送到远程计算机上的 Source文件中。因为TFTP不支持用户身份验证,所以用户必须登录到远程计算机,同时文件在远程计算机上必须可写。
get
将远程计算机上的 Destination 文件传送到本地计算机上的 Source 文件中。
Source
指定要传送的文件。
Destination
指定将文件送达的目标文件。如果省略了 Destination,将假定它与 Source 具有相同名称。
#################################
shancy@Computer:~$ tftp 192.168.1.103
tftp> put /home/shancy/111.txt /tftpboot/test
Error code 0: Permission denied
tftp>
NAME
tftp - Trivial File Transfer Protocol client
SYNOPSIS
tftp [ options... ] [host [port]] [-c command]
DESCRIPTION
tftp is a client for the Trivial file Transfer Protocol, which can be used to transfer files to and from remote machines, including some very minimalistic, usually embedded, systems. The remote host may be specified on the command line, in which case tftp uses host as the default host for future transfers (see the connect command below.)
OPTIONS
Tag | Description |
---|---|
-4 | Connect with IPv4 only, even if IPv6 support was compiled in. |
-6 | Connect with IPv6 only, if compiled in. |
-c command | |
Execute command as if it had been entered on the tftp prompt. Must be specified last on the command line. | |
-l | Default to literal mode. Used to avoid special processing of ’:’ in a file name. |
-m mode | Set the default transfer mode to mode. This is usually used with -c. |
-R port:port | |
Force the originating port number to be in the specified range of port numbers. | |
-v | Default to verbose mode. |
-V | Print the version number and configuration to standard output, then exit gracefully. |
COMMANDS
Once tftp is running, it issues the prompt tftp> and recognizes the following commands:
Tag | Description |
---|---|
? command-name... help command-name... |
|
Print help information | |
ascii | Shorthand for mode ascii. |
binary | Shorthand for mode binary. |
connect host [port] | |
Set the host (and optionally port) for transfers. Note that the TFTP protocol, unlike the FTP protocol, does not maintain connections between transfers; thus, the connectcommand does not actually create a connection, but merely remembers what host is to be used for transfers. You do not have to use the connect command; the remote host can be specified as part of the get or put commands. | |
get file | |
get remotefile localfile | |
get file1 file2 file3... | |
Get a file or set of files from the specified sources. A remote filename can be in one of two forms: a plain filename on the remote host, if the host has already been specified, or a string of the form host:filename to specify both a host and filename at the same time. If the latter form is used, the last hostname specified becomes the default for future transfers. Enable literal mode to prevent special treatment of the ’:’ character (e.g. C:\dir\file). | |
literal | |
Toggle literal mode. When set, this mode prevents special treatment of ’:’ in filenames. | |
mode transfer-mode | |
Specify the mode for transfers; transfer-mode may be one of ascii (or netascii) orbinary (or octet.) The default is ascii. | |
put file | |
put localfile remotefile | |
put file1 file2 file3... remote-directory | |
Put a file or set of files to the specified remote file or directory. The destination can be in one of two forms: a filename on the remote host, if the host has already been specified, or a string of the form host:filename to specify both a host and filename at the same time. If the latter form is used, the hostname specified becomes the default for future transfers. If the remote-directory form is used, the remote host is assumed to be a UNIX system or another system using / as directory separator. Enable literal mode to prevent special treatment of the ’:’ character (e.g. C:\dir\file). | |
quit | Exit tftp. End-of-file will also exit. |
rexmt retransmission-timeout | |
Set the per-packet retransmission timeout, in seconds. | |
status | Show current status. |
timeout total-transmission-timeout | |
Set the total transmission timeout, in seconds. | |
trace | Toggle packet tracing (a debugging feature.) |
verbose | |
Toggle verbose mode. |
NOTES
The TFTP protocol provides no provisions for authentication or security. Therefore, the remote server will probably implement some kinds of access restriction or firewalling. These access restrictions are likely to be site- and server-specific.
AUTHOR
This version of tftp is maintained by H. Peter Anvin <hpa@zytor.com>. It was derived from, but has substantially diverged from, an OpenBSD source base, with added patches by Markus Gutschke and Gero Kulhman.
SEE ALSO
-
1. Error code 0: Permission denied
主目录没有写权限, 可以 chmod 0777 /var/lib/tftpboot
2.Error code 1: File not found
在/etc/xinetd.d/tftp配置文件中,server_args后加上 -c 选项,方可上传
- service tftp
- {
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- server = /usr/sbin/in.tftpd
- server_args = -s /var/lib/tftpboot -c
- disable = no
- per_source = 11
- cps = 100 2
- flags = IPv4
- }
3. Transfer timed out.
如果第1,2条都没有问题,第3条可能是IPv6的原因,例如 在命令行下输入
# tftp localhost
系统可能使用的是IPv6的 ::1 地址,如下WireShark截图:
如果使用 # tftp 127.0.0.1 IPv4环回地址应该是没有问题的。
tftp-hpa客户端使用说明的更多相关文章
- TortoiseSVN客户端使用说明
TortoiseSVN客户端使用说明 TortoiseSVN不是一个独立的窗口程序,而是集成在windows右键菜单中,下面对TortoiseSVN的菜单项做简要的说明.01.SVN Checkout ...
- Git Server和sourceTree客户端使用说明
一.创建本地仓库 新建一个文件夹,命名为LocalRep,来作为本地仓库. 在终端 cd+拖拽文件夹到终端,打开文件夹在LocalRep目录下操作clone远程仓库到本地,指令如下所示(需根据实际情况 ...
- MPSOC之9——host、embeded间tftp、nfs、ftp环境搭建
tftp 可传输单个文件,不能传文件夹 需要通过命令传输文件,略显复杂 ==一般调试kernel时,用uboot通过tftp方式启动,不用每次都烧写存储介质== nfs 在host linux(ubu ...
- ubuntu10.04 安装配置tftp服务
tftpd-hpa 是一个功能增强的TFTP服务器.它提供了很多TFTP的增强功能,它已经被移植到大多数的现代UNIX系统. 1.安装 sudo apt-get install tftpd-hpa t ...
- 开发板tftp下载文件
搭建过程: 1.安装相关软件包:tftpd(服务端),tftp(客户端),xinetd sudo apt-get install tftpd tftp xinetd 2.建立配置文件(蓝色的目录是可以 ...
- 烂泥:CentOS安装及配置TFTP服务器
本文由秀依林枫提供友情赞助,首发于烂泥行天下. 为什么要学习有关TFTP服务器的安装及配置呢?主要是为了后续学习有关linux系统的无人值守安装做准备. TFTP简单文件传输协议,使用UDP的69端口 ...
- 在Ubuntu12.0.4下搭建TFTP服务器
一.安装相关安装包 tftpd(服务端),tftp(客户端) sudo apt-get install tftp-hpa tftpd-hpa 安装xinetd sudo apt-get install ...
- Ubuntu安装配置TFTP服务
tftpd-hpa 是一个功能增强的TFTP服务器.它提供了很多TFTP的增强功能,它已经被移植到大多数的现代UNIX系统. 1.安装 sudo apt-get install tftpd-hpa t ...
- 网络协议TFTP
TFTP(Trivial File Transfer Protocol,简单文件传输协议)是TCP/IP协议族中的一个用来在客户端与服务器之间进行简单文件传输的协议.和使用TCP的文件传输协议(FTP ...
随机推荐
- bzoj 2597 [Wc2007]剪刀石头布——费用流
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2597 三个人之间的关系,除了“剪刀石头布”,就是有一个人赢了2局:所以考虑算补集,则每个人对 ...
- 记一次socket_create()函数耗时异常记录
背景: 下午开发时突然整个页面耗时增加,空接口每次都需要2-3秒的耗时,一开始以为连开发环境数据库出现问题,最后断开数据库跑,发现还是很慢 最终逐步调试此页面耗时,定位到了socket_create( ...
- 基于Oracle的EntityFramework的WEBAPI2的实现(一)——准备工作
目前在.net的范围内,好的而且方便的ORM的真的不是很多,与VS集成方便的也就当属EntityFramework(以下简称EF,不知道为什么,总EF这个缩写好不专业).但是,好多公司使用的又是ORA ...
- jeecg中一对多的关系映射
1.首先看一张前端页面: 有一张主表和3张子表,显示这3张子表的代码如下 <t:tabs id="tt" iframe="false" tabPositi ...
- C++11标准库中cstdio头文件新增的5个格式化I/O函数学习
刚开始学网络编程,稍微扩展书上的简单C/S程序时,发现以前太忽略标准I/O这一块,查官网发现C++11新增了几个格式化I/O函数. snprintf 将格式化输出写入到有大小限制的缓存中 vfs ...
- 第六章 通过Service访问Pod(中)
6.2 Cluster IP 底层实现 Cluster IP 是一个虚拟IP,是由K8s节点上的iptables规则管理的. 使用类似轮询的方法访问Pod. 6.3 DNS 访问Service 在Cl ...
- JS-用法
JavaScript 用法 HTML 中的脚本必须位于 <script> 与 </script> 标签之间. 脚本可被放置在 HTML 页面的 <body> 和 & ...
- python装饰器注意事项
内容: 1.装饰器基本结构复习 2.装饰器注意事项 python装饰器详细内容:http://www.cnblogs.com/wyb666/p/8748102.html 1.装饰器基本结构复习 装饰器 ...
- Android屏幕适配方案——基于最小宽度(Smallest-width)限定符
转自:https://www.cnblogs.com/error404/p/3815739.html 一.关于布局适配建议 1.不要使用绝对布局 2.尽量使用match_parent 而不是fill_ ...
- ASU一位图形学老师推荐的book list
http://peterwonka.net/Documentation/BooksToRead.htm 包括数学.图形学.OpenGL等资料