3

Network device (embedded Linux) connected to local computer (Windows OS). What is tftp command to copy binary file from network device to local computer? Also, what's command to copy file in the opposite way, from local computer to network device?

EDIT:

I find the BusyBox tftp commands:

BusyBox v0.61.pre (2003.02.04-12:10+0000) multi-call binary

Usage: tftp [OPTIONS] HOST [PORT]

Transfers a file from/to a tftp server

Options:
        -l FILE Local FILE.
        -r FILE Remote FILE.
        -g      Get file.
        -p      Put file.

commands:

tftp -l <local file> -r <remote file> -p <remote ip>
tftp -g -r <remote file> <remote ip>
2
  • SSH and TFTP are different file transfer protocols. You would normally use a TFTP client to do TFTP transfers. How is SSH involved here?
    – Kenster
    Aug 3, 2014 at 18:25
  • I mean transfer file from device running Linux(from SSH shell) to local Windows PC that have TFTP server (Tftpd32).
    – Lexx Luxx
    Aug 3, 2014 at 20:26

2 Answers 2

1
tftp 192.168.1.1 -m binary -c put localfile remotefile 
tftp 192.168.1.1 -m binary -c get remotefile localfile

Of course you will have to change the ip address to the address of the computer you are going to access.

tftp defaults to ascii, so the binary mode has to be specified or you will receive a file mismatch error.

2
  • 2
    I just find busybox tftp commands, so its: tftp -l <local file> -r <remote file> -p <remote ip> and tftp -g -r <remote file> <remote ip> In the first command, is the -r <remote file> a mandatory argument, or it can be omitted? Also, seems there is no binary mode in busybox tftp commands?
    – Lexx Luxx
    Aug 4, 2014 at 11:21
  • Should I assign a static IP address to a computer?
    – Lexx Luxx
    Aug 4, 2014 at 17:10
0

Use:

tftp -gr filename 192.168.1.1:69

to get the file from the server. You need to setup tftp and enable a firewall exception.

From device to PC you can use:

udpsvd -Ev 192.168.1.1 69 tftpd
3
  • can you comment last command? What is its purpose?
    – Lexx Luxx
    Feb 27, 2018 at 9:29
  • device will became tftp server and other tftp client can get file from this device
    – Chan Wai
    Mar 5, 2018 at 6:02
  • the busybox implementation on an embedded device have no such commands. It's all device specific.
    – Lexx Luxx
    Mar 6, 2018 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .