当前位置:网站首页>一秒钟查看一次文件,并将文件最后一行内容结果发送至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边栏推荐
- Pseudocode specification, pseudocode online editor,
- 30 sets of report templates necessary for the workplace, meeting 95% of the report needs, and no code is required for one click application
- 利用for循环输出一个字母三角形
- 2. probability theory - axiom of probability theory
- MySQL on duplicate key and PgSQL on conflict (primary key) handle primary key conflicts
- 浅析 Open API 设计规范
- 数学知识:欧拉函数—欧拉函数
- [深度学习][原创]如何不用yolov5权重或者模型进行目标检测和绘制map等参数图
- openni. utils. OpenNIError: (OniStatus.ONI_STATUS_ERROR, b‘DeviceOpen using default: no devices found‘
- openni.utils.OpenNIError: (OniStatus.ONI_STATUS_ERROR, b‘DeviceOpen using default: no devices found‘
猜你喜欢
![[veusz] import 2D data in CSV](/img/22/467139f5a83ce9e88a57ced732d4d6.png)
[veusz] import 2D data in CSV

20bn Jester complete dataset Download

JS to determine the added and decreased elements of two arrays

Start appium

ArcMap批量删除距离较近的点

WPS for thesis writing installs MathType plug-in to write mathematical formulas

【PyQt5系列】修改计数器实现控制
![[Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?](/img/ee/ce9f55694b28c391eb07cb11298caf.jpg)
[Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?

How to quickly and gracefully download large files from Google cloud disk (II)

Both are hard disk partitions. What is the difference between C disk and D disk?
随机推荐
3dmax插件开发环境配置及FileExport和Utilities模板测试
U-Net: Convolutional Networks for Biomedical Image Segmentation
openni. utils. OpenNIError: (OniStatus.ONI_STATUS_ERROR, b‘DeviceOpen using default: no devices found‘
Guava Cache 使用小结
Quickly delete the node in the code_ modules
NFS special attention to permissions
基于51单片机的温度检测监测报警系统设计
[Laoke] how should ordinary people learn technology?
How bootstrap clears floating styles
Yan's DP analysis
职场必备的30套报表模板,满足95%的报表需求,一键套用无需代码
1278_ FreeRTOS_ Understand the delayed task with the prvaddcurrenttasktodelayedlist interface
Can you think of a better way to solve the problem of string inversion?
【星球精选】如何高效构建 Roam 与 theBrain 间细粒度双向链接?
Intelligence Education - how to merge codes when code conflicts occur in multi person collaborative development?
Yolov5 detecting small targets (with source code)
. H5 file forgets the database name and uses h5py to print
Acwing game 56 [End]
Ffplay realizes user-defined input stream playback
Unity图片加载和保存