如何通过某些过程打开文件列表

发布于 2025-01-27 22:00:43 字数 487 浏览 2 评论 0 原文

在Mac上,我可以

sudo filebyproc.d 2>/dev/null | grep " cat "

cat balbalbla

运行

sudo filebyproc.d 2>/dev/null | grep " cat "
Password:
  8    178                       open:entry cat /dev/dtracehelper
 10    964              open_nocancel:entry cat /usr/share/locale/UTF-8/LC_CTYPE
  2    178                       open:entry cat balbalbla

这是CAT进程打开的所有文件的列表。

如何在QNX中执行相同的(或相似)?

On mac i can do

sudo filebyproc.d 2>/dev/null | grep " cat "

running

cat balbalbla

i've got

sudo filebyproc.d 2>/dev/null | grep " cat "
Password:
  8    178                       open:entry cat /dev/dtracehelper
 10    964              open_nocancel:entry cat /usr/share/locale/UTF-8/LC_CTYPE
  2    178                       open:entry cat balbalbla

which is the list of all files open by cat process.

How to do the same (or similar) in QNX?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

摇划花蜜的午后 2025-02-03 22:00:43

使用 pidin -p< process> FDS < process> 可以指定为PID或二进制的名称(例如'Cat')。

参考:

Use pidin -p <process> fds. <process> may be specified as either a pid or the name of the binary (eg. 'cat').

Ref: http://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.utilities/topic/p/pidin.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文