当前位置:网站首页>一秒钟查看一次文件,并将文件最后一行内容结果发送至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边栏推荐
- Playwirght深度入门
- 某年某月某公司的面试题(1)
- NFS special attention to permissions
- 左乘右乘矩阵问题
- 1278_FreeRTOS_借助prvAddCurrentTaskToDelayedList接口理解delayed task
- Sstable details
- To conquer salt fields and vegetable fields with AI, scientific and technological innovation should also step on the "field"
- 《一周的朋友》
- Mathematical knowledge: fast power fast power
- Unity to wechat applet games
猜你喜欢

基于51单片机的温度检测监测报警系统设计

Playwirght深度入门

MIT CMS. 300 session 12 – identity construction Part 2

这道字符串反转的题目,你能想到更好的方法吗?

To conquer salt fields and vegetable fields with AI, scientific and technological innovation should also step on the "field"

Yan's DP analysis

HCIP之路MPLS

YGG Spain subdao Ola GG officially established

Qt工程报错:-1: error: Cannot run compiler ‘clang++‘. Output:mingw32-make.exe

1278_FreeRTOS_借助prvAddCurrentTaskToDelayedList接口理解delayed task
随机推荐
[pyqt5 series] modify the counter to realize control
深度学习------卷积(conv2D)底层
Gif verification code analysis
2.概率论-概率论公理
HCIP之路MPLS
3dmax插件开发环境配置及FileExport和Utilities模板测试
C WPF realizes dynamic loading of controls through binding
What is the experience of being a data product manager in the financial industry
Tri rapide + Tri par bulle + Tri par insertion + Tri par sélection
Chain tour airship development farmers' world chain tour development land chain tour development
论文写作之WPS安装Mathtype插件编写数学公式
[deep learning] [original] how to detect targets and draw map and other parameter maps without yolov5 weights or models
电脑如何安装MySQL?
论文伪代码规范,伪代码在线编辑器,
数学知识:快速幂—快速幂
Unity to wechat applet games
2. probability theory - axiom of probability theory
Sstable details
Query on the performance of multi table view in MySQL
JS to determine the added and decreased elements of two arrays