我如何跟踪哪个程序正在删除我的文件? [英] How can I track which program is deleting my files?

查看:313
本文介绍了我如何跟踪哪个程序正在删除我的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个间歇性的问题,我试图追查。每隔一段时间,我的 src 目录中的很大一部分被删除(如所有文件的90%)。我将在我的项目上工作,突然间我会得到一个错误,看看 git status ,它会显示我的回购中几乎所有的文件已被删除。然后,我必须运行一堆 git checkout - 命令,如果我不失去一大堆工作,我很幸运。



我可以使用 inotify 或其他程序来监视我的 src 目录并报告哪个程序是删除文件?我有一种感觉,它是一口气,但我没有证据超越轶事,我不想打扰一个具体的项目,直到我确定了问题的根源。

library / mac / documentation / Darwin / Reference / ManPages / man8 / audit.8.htmlrel =nofollow> Auditing 。这是审计设计的一件事。



不要自己动手。请勿使用专为其他目的而设计的工具。使用您的操作系统提供的审计工具。

OS X的基本教程在这里:
$ b


在Mac OS X上进行OpenBSM审计



回到10.3.x,苹果提交给Mac OS X和Mac OS X Server
National信息保障合作伙伴共同标准
认证。 Common Criteria认证意味着
涵盖的硬件和软件已经过测试和评估,以确保
符合一套既定的安全要求和
数据保护要求。 10.3.6和10.3.6服务器进行了测试,结果发现
满足通用标准
认证的评估保证等级3(EAL3)。


作为认证工作的一部分,一个新的软件出现在Apple的
:Common Criteria Tools审计软件中。这个软件
是OpenBSM,它是Sun的Basic
安全模块(BSM)安全审计API和文件格式的开源实现。 ...


是的,正确的做法是很痛苦的。但是 会起作用,结果将是确定性的。

I'm having an intermittent problem that I'm trying to track down. Every now and then a significant portion of my src directory is being erased (like 90%+ of all files). I'll be working on my project and all of a sudden I'll get an error, look at git status and it will show nearly all of the files in my repo have been deleted. Then I have to run a bunch of git checkout -- commands and I'm lucky if I don't lose a bunch of work.

Can I use inotify or another program to watch my src directory and report which program is deleting the files? I have a feeling it's gulp but I have no evidence beyond the anecdotal, and I don't want to bother a specific project until I've nailed down the source of the problem.

OS X, by the way.

解决方案

Auditing. This is one thing that auditing is designed for.

Don't roll your own. Don't use tools designed for other purposes. Use the auditing facilities your operating system provides.

Basic tutorial for OS X is here:

OpenBSM auditing on Mac OS X

Way back in 10.3.x, Apple submitted Mac OS X and Mac OS X Server to the National Information Assurance Partnership for Common Criteria certification. Common Criteria certification means that the the covered hardware and software has been tested and evaluated to make sure that it meets an established set of requirements for security and data protection. 10.3.6 and 10.3.6 Server were tested and were found to meet Evaluation Assurance Level 3 (EAL3) for Common Criteria certification.

As part of that certification effort, a new piece of software appeared from Apple: the Common Criteria Tools audit software. This software was OpenBSM, which is an open source implementation of Sun’s Basic Security Module (BSM) security audit API and file format. ...

Yes, it's a pain to do properly. But it will work, and the results will be definitive.

这篇关于我如何跟踪哪个程序正在删除我的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆