如何在Linux中检查已建立的域

发布于 2025-02-13 23:02:56 字数 276 浏览 2 评论 0原文

我的目的是检查是否正在从运行Linux的系统访问域,如果访问该域,我需要运行命令。

我已经使用crontab实现了这一点。我写了一个小脚本,如果要访问域,请说'https://www.youtube.com/',我运行了一个命令,将通知发送给系统上的用户,并且每分钟运行此脚本使用cron。这主要用于父母控制。除了我们查看是否访问了一个域,我还弄清楚了一切。我尝试阅读netstat命令文档,但在那里找不到任何东西。我只需要一个命令,该命令可以检查该特定秒的特定网站/域是否正在访问。提前致谢!

My aim is to check if a domain is being accessed from a system running Linux, and if it is being accessed, I need to run a command.

I have accomplished this using crontab. I have written a little script where if a domain is being accessed, say 'https://www.youtube.com/', I run a command to send a notification to the user on the system, and this script is run every minute using cron. This is mainly for parental control. I have everything figured out except for the part where we see if a domain is being accessed. I tried reading the netstat command documentation but I couldn't find anything there. I just need a command which can check if a specific website/domain is being accessed at that particular second. Thanks in advance!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文