Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

busybox pkill doesn't have '-u' option #7

Closed
toshi0123 opened this issue Nov 13, 2017 · 2 comments
Closed

busybox pkill doesn't have '-u' option #7

toshi0123 opened this issue Nov 13, 2017 · 2 comments

Comments

@toshi0123
Copy link
Owner

error as follows.

# busybox pkill -u
pkill: unrecognized option: u
BusyBox v1.27.2 (2017-10-20 05:56:33 GMT) multi-call binary.

Usage: pkill [-l|-SIGNAL] [-fnovx] [-s SID|-P PPID|PATTERN]

Send a signal to process(es) selected by regex PATTERN

        -l      List all signals
        -f      Match against entire command line
        -n      Signal the newest process only
        -o      Signal the oldest process only
        -v      Negate the match
        -x      Match whole name (not substring)
        -s      Match session ID (0 for current)
        -P      Match parent process ID
@toshi0123
Copy link
Owner Author

toshi0123 commented Nov 13, 2017

busybox pkill is still used even if procps package is installed.
/usr/bin/pkill is linked to busybox. procps pkill is in /bin/.

# ls -l /usr/bin/pkill
lrwxrwxrwx    1 root     root            12 Nov 13 01:52 /usr/bin/pkill -> /bin/busybox
# ls -l /bin/pkill
lrwxrwxrwx    1 root     root             5 Nov 11 13:40 /bin/pkill -> pgrep

env PATH as follows prefer to use /usr/bin not /bin.

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

@toshi0123
Copy link
Owner Author

Modified as follows.

rm -f /usr/bin/pkill
ln -s /bin/pkill /usr/bin/pkill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant