7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

psコマンドからプロセスIDを取得する

Last updated at Posted at 2016-07-16

#ローカルの場合

ps -ef | grep name | grep -v grep | awk '{ print $2 }'

#リモートの場合

awkのパラメータをエスケープする必要がある
ssh user@remotehost "ps -ef | grep name | grep -v grep | awk '{ print \$2 }'"

#参考
http://qiita.com/aibou/items/159a18ca70ac87b40bad

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?