新建 Shell 脚本文件 test_shell_0编辑内容如下。 cd varlog cat devnull messages cat devnull wtmp echo Logs cleaned up 运行 test_shell_0 脚本记录输出结果并分析功能是什么
输出结果为 "Logs cleaned up.",功能是清空/var/log/messages和/var/log/wtmp文件。
原文地址: http://www.cveoy.top/t/topic/bnmX 著作权归作者所有。请勿转载和采集!