当前位置: 移动技术网 > 网络运营>服务器>Linux > linux中shell脚本实现下载完关机

linux中shell脚本实现下载完关机

2017年12月12日  | 移动技术网网络运营  | 我要评论

用mint 有一段时间了,下载基本用firefox,有时下载几个g的游戏。可是firefox没有找到下载完关机的选择。处于这个原因,写了这个。

download_shutdown.sh

#!/bin/bash
# created by:   demo <demo@demo.com>
# created time:  2015-01-30 12:36:44
# modified time:  2015-01-30 12:54:21
dir=$1
while [ "1" ]
do
  if [ ! -d "$1" -a -x "$1" ];then
    echo 'please specify a directory'
  fi
   
  ret=`find $1 -ctime -4 |sort | wc | awk -f ' ' '{print $1}'`
  if [ "$ret" -ge "2" ];then
    #echo 'h'
    sleep 240 
  else
    init 0
  fi
done

以上所述就是本文的全部内容了,希望大家能够喜欢。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网