?? mirror.nightly
字號:
#!/bin/sh# Manage a nightly mirror run.# Most of the dirty work is done via mm. This# really just handles the logs and mails them out.# Where mirror and mm are to be foundhome=/opt/sunsite/mirror# Who and how to mail stuff backmailto=lmjmmail=/usr/bin/mailxmailargs="-s 'nightly mirror log'"# Argument to pass to sort to get it to show the biggest files# in a directory listing.#BSD usually +3n, System 5 usually +4n.biggest=+3n# Make sure we dont wast space with core dumps (perl5 does do this)ulimit -c 0# You shouldn't have to change anything below here.# Log output here.log=mirror.nightly.outcd $homeif [ -r $log ]; then # Keep one days backups of the old logs mv -f $log $log.oldfi# Run mirror master# It will output all the package log info' into files in# the logs/ directory.rm -f $logif test ! -d logs; then mkdir logs; fi./mm -debug mmin >$log 2>&1 < /dev/null# Send me the "interesting" bits of the logs# The old, new and big stuffls -ltr logs > /tmp/mn-log( cd logs echo Unlinks needed on: grep -l "^NEED" * echo echo Old: head /tmp/mn-log echo echo Recent: tail /tmp/mn-log echo echo Biggest: sort $biggest < /tmp/mn-log | tail echo echo The interesting logs:: ../prune_logs *) > /tmp/mn-msgeval $mail $mailargs $mailto < /tmp/mn-msgrm -f /tmp/mn-log /tmp/mn-msg
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -