⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 switchnoflushd

📁 linux 系统控制硬盘旋转和停止的程序(spin down/up)
💻
字号:
#!/bin/sh -e## $Id: switchNoflushd,v 1.1 2002/04/20 15:34:37 nold Exp $## Wrapper script to switch noflushd timeouts and log the result.## Contributed by Thomas Link <t.link@gmx.at>getNext () {	echo $1 | sed -e "s/\\([0-9]\\+\\).*/\\1/"}NOFLUSHD_DIR=/var/lib/noflushdkill -s SIGHUP `cat /var/run/noflushd.pid`DEFAULT_TIMEOUT=`cat ${NOFLUSHD_DIR}/timeout`STATE=`cat ${NOFLUSHD_DIR}/state`if [ -e ${NOFLUSHD_DIR}/history ]; then	HIST=`cat ${NOFLUSHD_DIR}/history`fiREST=`echo ${DEFAULT_TIMEOUT} | sed -e "s/^\\(${HIST},\\|.*\\)\\(.*\\)/\\2/"`NEW=`getNext ${REST}`if [ -z "${NEW}" ]; then	NEW=`getNext ${DEFAULT_TIMEOUT}`	echo ${NEW} > ${NOFLUSHD_DIR}/historyelse	echo ${HIST},${NEW} > ${NOFLUSHD_DIR}/historyfiecho ${NEW} > ${NOFLUSHD_DIR}/statelogger -t noflushd set timeout to ${NEW}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -