First of all, `ls *`
is wrong. The same intended result can be achieved by using just *
, as in:
tftp -m binary 192.168.1.2 -c put * target/
Wildcard expansions are processed by your shell before running the command, so the correct way to expand *
to a list of files is to simply use *
, never `ls`
.
Second, the tftp put
command can upload multiple files, but it only accepts a single destination directory when doing so. You don't need to specify multiple targets, and it would not work anyway – tftp
wouldn't know where source files end and target files begin. (As said earlier, the wildcards are expanded by your shell, so tftp
would receive put file1 file2 file3
, not put *
.)
The mysterious :
is caused by ls
listing the contents of subdirectories. When you run ls *
, the shell actually runs ls file1 file2 dir1
(let's assume you have two files and a directory). Then ls
prints "file1
", "file2
", followed by "dir1: (...all files in dir1...)
".