当前位置:网站首页>一秒钟查看一次文件,并将文件最后一行内容结果发送至syslog服务器
一秒钟查看一次文件,并将文件最后一行内容结果发送至syslog服务器
2022-06-23 07:19:00 【时光凉春衫薄】
发送日志的命令
# logger `cat /root/.bash_history |tail -n 1` -n 192.168.1.75logger ` 命令 ` -n 目标地址(logger把 cat 查看/root/.bash_history文件中最后一行的内容发送至192.168.1.75上)
一秒钟执行一次的脚本
#!/bin/sh
while [ true ]; do
/bin/sleep 1
logger `cat /root/.bash_history |tail -n 1` -n 192.168.1.75
done边栏推荐
- [markdown] markdown tutorial summary
- 职场必备的30套报表模板,满足95%的报表需求,一键套用无需代码
- Playwirght深度入门
- Minio single node deployment Minio distributed deployment fool deployment process (I)
- Chain tour airship development farmers' world chain tour development land chain tour development
- Tri rapide + Tri par bulle + Tri par insertion + Tri par sélection
- JS to determine the added and decreased elements of two arrays
- Vs problems when connecting to SQL myconn OPen(); cannot execute
- 2022 final examination of software project management of School of software, Shandong University (recall version)
- Eureka服务注册与发现
猜你喜欢

MIT CMS.300 Session 12 – IDENTITY CONSTRUCTION 虚拟世界中身份认同的建立 part 2

某年某月某公司的面试题(1)

Start appium
![[* * * array * * *]](/img/fe/2520d85faab7d1fbf5036973ff5965.png)
[* * * array * * *]

Design of temperature detection and alarm system based on 51 single chip microcomputer

Matlab random volatility SV, GARCH using MCMC Markov chain Monte Carlo method to analyze exchange rate time series

Deploy kubersphere in kubernetes

Gif verification code analysis

职场必备的30套报表模板,满足95%的报表需求,一键套用无需代码

【云计算赛项】职业技能竞赛--容器开发部分例题Pig快速开发框架
随机推荐
TCP fastopen is used inside the origin server to quickly return to the source
How to tag and label naming before the project release
Mathematical knowledge: fast power fast power
[veusz] import 2D data in CSV
基于51单片机的温度检测监测报警系统设计
Decoding and practice of cmaf Technology
2.概率论-概率论公理
The eighth experiment of hcip Road
Introduction to MySQL system tables
测试apk-异常管控NetTraffic攻击者开发
Design of temperature detection and alarm system based on 51 single chip microcomputer
启动appium
1.概率论-组合分析
传智教育 | 多人协作开发出现代码冲突,如何合并代码?
JS to determine the added and decreased elements of two arrays
279. perfect square
Matlab随机波动率SV、GARCH用MCMC马尔可夫链蒙特卡罗方法分析汇率时间序列
Gif verification code analysis
MIT CMS.300 Session 12 – IDENTITY CONSTRUCTION 虚拟世界中身份认同的建立 part 2
Match 56 de la semaine d'acwing [terminé]