以下のコマンドでプロセスIDを取得できる。
# プロセスIDを取得するコマンド
ps aux | grep ${対象のコマンド} | grep -v grep | awk '{print $2}'
# (例)sshコマンドのプロセスIDを取得する場合
ps aux | grep ssh | grep -v grep | awk '{print $2}'
Go to list of users who liked
More than 1 year has passed since last update.
以下のコマンドでプロセスIDを取得できる。
# プロセスIDを取得するコマンド
ps aux | grep ${対象のコマンド} | grep -v grep | awk '{print $2}'
# (例)sshコマンドのプロセスIDを取得する場合
ps aux | grep ssh | grep -v grep | awk '{print $2}'
Register as a new user and use Qiita more conveniently
Go to list of users who liked