#!/bin/bash funmd5_1() { find /root/passwd -type f | xargs md5sum > /tmp/funmd5_1.log } funmd5_2() { find /root/passwd -type f | xargs md5sum > /tmp/funmd5_2.log } if [ ! -f /tmp/funmd5_1.log ];then funmd5_1 fi funmd5_2 diff /tmp/funmd5_1.log /tmp/funmd5_2.log > /tmp/diff.log Status=$? if [ $Status = 0 ];then exit else echo "文件修改過了!" fi
標(biāo)簽:通遼 青島 南充 隨州 朝陽 延邊 西藏 雅安
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Shell腳本實現(xiàn)檢測文件是否被修改過代碼分享》,本文關(guān)鍵詞 Shell,腳本,實現(xiàn),檢測,文件,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。