suggests that the way you are using pkill is not correct.
Let's break down your command:
pkill -f "-n 100"
What does this do?
pkill is used to kill processes by name or other attributes.
-f tells pkill to match against the full command line.
"-n 100" is being interpreted as the pattern to match.
The problem
The error is likely because of the way the pattern is specified. The pattern -n 100 (with quotes) is being passed as a single argument, but if you have a space in the pattern, pkill may get confused, especially if the pattern starts with a dash (-). Some versions of pkill may interpret -n as an option, not as part of the pattern.
How to fix
1. Use -- to indicate the end of options
If you want to match a pattern that starts with a dash, use -- to tell pkill that what follows are not options:
pkill -f -- "-n 100"
2. If you want to kill the most recent 100 processes, that's not what -n 100 does in pkill
-n is not a valid option for pkill (in most implementations).
If you want to kill processes matching a pattern, use pkill -f PATTERN.
If you want to kill the most recent process, you can use pkill -n PATTERN (on some systems), but not with -n 100.
3. If you want to kill processes with a command line containing -n 100, the correct command is:
pkill -f -- "-n 100"
4. If you want to kill 100 processes, you need a different approach (e.g., using ps, head, and kill).
Summary
The error is because pkill thinks -n is an option, not a pattern.
Use -- to separate options from patterns that start with a dash:
pkill -f -- "-n 100"
If you want to do something else, please clarify your goal!
Let me know if you need help with a specific use case!