在Linux上,文件由哪个程序创建?

发布于 2024-11-29 15:22:07 字数 201 浏览 1 评论 0原文

我有与此帖子相同的问题 只是我的问题是在Linux平台上

我的文件夹中有一个目录 我不知道哪个程序创建了它 有可能知道吗?

谢谢

I have the same questions as this post
Only that my question is on the Linux platform

I have a directory in my folder
and I don't know which program has created it
Is it possible to know ?

Thanks

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

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

发布评论

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

评论(3

邮友 2024-12-06 15:22:07

同样的答案适用,除非文件本身具有像某些 .doc 文件这样的元数据,并且包含您无法知道是什么创建了该文件的信息(除非您创建一个内核模块来拦截创建新文件的块请求并检查哪个应用程序提交了请求但这可能不是您想要做的)。

Same answer applies, unless the file itself has metadata like some .doc files and such that contains the information you cannot know what created the file (unless you create a kernel module to intercept block requests to create new files and check what application submitted the request but that is probably not what you want to do).

樱娆 2024-12-06 15:22:07

答案与上一个问题相同——一般来说,不会。

但是,您可以查看该目录的所有者和组;如果创建它的程序是守护进程(服务)进程,它可能在自己的用户/组下运行,因此创建的文件/目录可能具有这些所有权。

这说明了什么?

ls -l /path/to/the/directory

The answer is the same as in the previous question -- generally, no.

However, you can look at the owner and group of this directory; if the program that creates it is a daemon (service) process, it might be running under its own user / group and thus the files / directories created might have those ownerships.

What does this say?

ls -l /path/to/the/directory
凯凯我们等你回来 2024-12-06 15:22:07

答案与您链接的问题的答案相同。 Linux 不存储有关文件创建者的信息(具体是哪个程序创建的)。但是,就像其他答案所说,您可以创建一个监视器并自己记录该信息。

The answer is the same as the one for question you linked. Linux doesn't store information about the creator of the file as far as which program did it. But, like the other answer said, you could create a monitor and record that information yourself.

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