用mint 有一段时间了,下载基本用firefox,有时下载几个G的游戏。可是firefox没有找到下载完关机的选择。处于这个原因,写了这个。
download_shutdown.sh
#!/bin/bash # Created By: Demo <[email protected]> # 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
以上所述就是本文的全部内容了,希望大家能够喜欢。
您可能感兴趣的文章:
- Linux (Ubuntu)休眠,挂起,待机,关机的命令详细介绍
- php控制linux服务器常用功能 关机 重启 开新站点等
- 轻松掌握Linux关机重启命令
- 详解linux 关机命令总结
- Linux管理员手册(5)--引导和关机
- Linux关机时执行指定脚本功能实现
- 详解 Linux中的关机和重启命令
- Linux 使用init命令实现关机,重启,切换模式
- Linux低电量自动关机的实现方法
本文由 华域联盟 原创撰写:华域联盟 » linux中shell脚本实现下载完关机
转载请保留出处和原文链接:https://www.cnhackhy.com/16804.htm