On Fri, Oct 31, 2025 at 05:18:35PM +0000, Olivier Cailloux via Syslinux
wrote:> Dear list,
>
> I post here in view of
https://git.kernel.org/pub/scm/network/tftp/tftp-hpa.git/about/ , apologies if
this is not the right place.
>
> I come to ask for a new feature in tftp: could this be made to work
(similar to how cp works)?
>
> tftp $TFTP_IP -c get somefilename.txt somefolder/
This is generally possible today, but depends on your TFTP client
(rather than the TFTP server).
E.g. with an HPA tftp client (say, from Debian) you can do things like:
$ tftp server -c get remotepath/file.txt localpath/myfile.txt
and end up with a local copy of remotepath/file.txt in a directory and
filename called localpath/myfile.txt .
If you want to preserve the same filename as the source, you need to
provide it on the destnation too, e.g.
$ tftp server -c get remotepath/file.txt localpath/file.txt
It seems you can't simply provide a local directory as the target
destination. This makes sense when you look at the tftp(1) syntax
description for 'get' command:
get file
get remotefile localfile
get file1 file2 file3...
You can also do things like 'tftp server:file' etc. according to the
man page, though I didn't experiment.
Note that not all TFTP clients work like this, e.g. some BSD-flavored
tftp have no "-c" and use interactive mode:
$ tftp tftpserver
tftp> get remotepath/filename.txt localpath/myfilename.txt
...but some (like FreeBSD) also support installing HPA tftp from their
packages collection if you prefer that.
Cheers,
sr.