当前位置:网站首页>一秒钟查看一次文件,并将文件最后一行内容结果发送至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边栏推荐
- To conquer salt fields and vegetable fields with AI, scientific and technological innovation should also step on the "field"
- 3dmax插件开发环境配置及FileExport和Utilities模板测试
- Using the for loop to output an alphabetic triangle
- MySQL slow query record
- Decoding and practice of cmaf Technology
- Matlab random volatility SV, GARCH using MCMC Markov chain Monte Carlo method to analyze exchange rate time series
- 一篇文章学会er图绘制
- [markdown] markdown tutorial summary
- 【Veusz】导入CSV中的二维数据
- js中的同步和异步
猜你喜欢

Both are hard disk partitions. What is the difference between C disk and D disk?

How bootstrap clears floating styles

openni.utils.OpenNIError: (OniStatus.ONI_STATUS_ERROR, b‘DeviceOpen using default: no devices found‘
![[cloud computing event] vocational skill competition -- container development example pig rapid development framework](/img/4b/393b5980090330602a501867c60089.png)
[cloud computing event] vocational skill competition -- container development example pig rapid development framework
![Match 56 de la semaine d'acwing [terminé]](/img/f6/cd650331c819a27f17c9ce6cd0c569.png)
Match 56 de la semaine d'acwing [terminé]

《一周的朋友》

Abnormal logic reasoning problem of Huawei software test written test

Gif verification code analysis

Eureka服务注册与发现

某年某月某公司的面试题(1)
随机推荐
Talk about routing design in service governance
Yolov5 detecting small targets (with source code)
Playwirght getting started
[深度学习][原创]如何不用yolov5权重或者模型进行目标检测和绘制map等参数图
The Sandbox 与《足球小将》达成合作,将流行的足球漫画及动画带入元宇宙
unity 音频可视化方案
[Laoke] how should ordinary people learn technology?
Here comes the dry goods | PAAS collection to see first ~
论文伪代码规范,伪代码在线编辑器,
RTMP streaming exception fast recovery scheme
[Planet selection] how to efficiently build fine-grained two-way links between roam and thebrain?
Ntu-rgbd data set download and data format analysis
Download the OSS file and modify the file name
快速删除代码里面的node_modules
基于51单片机的温度检测监测报警系统设计
[veusz] import 2D data in CSV
30 sets of report templates necessary for the workplace, meeting 95% of the report needs, and no code is required for one click application
Difference between char and varchar
Unity audio visualization scheme
The sandbox has reached a cooperation with football player to bring popular football cartoons and animation into the metauniverse