2
3

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.

特定のパッケージに含まれるファイルをオープンしているプロセスを調べるワンライナー(rpm編)

Last updated at Posted at 2016-10-04

例として、openssl-libsのパッケージに含まれるファイルをオープンしているプロセスを調べる

  • lsofの結果を絞り込むだけの場合
$ sudo lsof +c 15 |grep -f <(rpm -ql openssl-libs)

  • プロセス名だけを表示する場合
$ sudo lsof +c 15 |grep -f <(rpm -ql openssl-libs) |awk '{count[$1]++} END{for(key in count){print key}}'
  • プロセス名とPIDだけを表示する場合
$ sudo lsof +c 15 |grep -f <(rpm -ql openssl-libs) |awk '{count[$1" "$2]++} END{for(key in count){print key}}'
2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?