当前位置:网站首页>Shell disk space usage
Shell disk space usage
2022-06-09 01:20:00 【ghostwritten】
Shell Disk space usage
disk-space.sh
MAX=95
EMAIL=[email protected]
PART=sda1
USE=$(df -h | grep $PART | awk '{ print $5 }' | cut -d'%' -f1)
USE=`printf "%.0f\n" $USE`
if [ $USE -gt $MAX ]; then
echo "Percent used: $USE" | mail -s "Running out of disk space" $EMAIL
else
echo "all is well"
fi
perform :
$ bash disk-space.sh
all is well
Read more :
边栏推荐
- Device qdisc binding
- Goeasy applet instant messaging source v1.1.0/ based on websocket communication service provided by goeasy
- Dom----- event flow
- The best practice of knowledge management in the digital age
- Leetcode brush questions -2 Add two numbers -go
- 汇编语言集成开发环境学习笔记
- Daily weekly report
- Blazorise场景构建高性能Web应用
- Simple implementation of LinkedList underlying source code (common methods)
- ABViewer布局检测器功能以及性能改进
猜你喜欢

Advanced extensible interface (Axi)

Simple understanding process of machine learning, basic steps of face recognition

Abviewer layout detector function and performance improvement

Dry goods | first glimpse of pytest test framework, which can easily hold even if the foundation is weak

Today's sleep quality record 76 points

Svg web animation Halloween night

Mongodb usage details_ 2_ Indexing and aggregation

Go language loop statement -for loop

Matrix - 2D area and retrieval - matrix immutable, leetcode 304

GDB notes (10) - check for memory leak, heap overflow, stack overflow, global memory overflow, and continue using after release
随机推荐
Dom----- event flow
Django MySQL database (IV)
What is the correct way to start a thread?
iscc-2022
django mysql数据库(四)
Renewal certificate of kubernetes kubeadm Management Certificate
Simple implementation of LinkedList underlying source code (common methods)
Go language type conversion
shell 微调加载器
2022-06-08:找到非负数组中拥有“最大或的结果“的最短子数组,返回最短长度。
Happy birthday to a Jing
【牛客网SQL篇】SQL必知必会
Notes on live broadcast of student letter skill tree R language learning
Shell 减法
Web slider drag selection value slider plug-in
An analysis of SQL query optimization principle: 900w+ data, from 17s to 300ms
ABViewer布局检测器功能以及性能改进
Is it safe for Hualong futures to open an account?
SSM (4) -- login authentication (interception)
Shell 磁盘空间使用率