1833275 Members
2873 Online
110051 Solutions
New Discussion

Re: TFTP command

 
SOLVED
Go to solution
Priss_1
Advisor

TFTP command

Hi,

can I use one line command to tftp a file from a server? At the moment, I have to type:

tftp
get

Many thanks.

Priss
Doooh
2 REPLIES 2
Claudio Cilloni
Honored Contributor
Solution

Re: TFTP command

I have no tftp server to verify, but

$ echo "get " | tftp

maybe works...

Ciao,
Claudio
Graham Cameron_1
Honored Contributor

Re: TFTP command

You can't do this with tftp alone, but you could write a script to do it.

eg, create a file gettftp, containing:

#!/usr/bin/sh
tftp $1 << EOF
get $2
EOF

then "chmod u+x gettftp" and run it with "gettftp "

I leave you to add your own error checking...

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.