killall utility does not take a pattern, it takes a list of one or several process names to send a signal to.
What's happening when you say
killall name* is that the shell will expand the unquoted filename globbing pattern
name* to all filenames in the current directory that matches that pattern.
You obviously have some filenames in
/tmp that matches this pattern and that also corresponds to the processes that you'd like to kill. When there are no matching filenames, like there doesn't seem to be in the
/ directory on your system, your shell leaves the pattern unexpanded. The
killall utility can't find any processes called
name* and complains about that in the way that you report in the question.
For a utility that works more like what you expected, consider the
pkill utility. With it, you may signal processes based on an extended regular expression matching their names.
The following would send the
TERM signal to all processes whose names start with
name (note that the pattern should generally be quoted):
To signal processes whose name matches
pkill -x name
To also consider the arguments given to the process, use the
-f option with
pkill, e.g. to kill the
cat command that you started by typing
pkill -f -x 'cat myfile'
See also the
pkill manual (