博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
find big file
阅读量:7040 次
发布时间:2019-06-28

本文共 1228 字,大约阅读时间需要 4 分钟。

#!/bin/bash#command usage descriptionfunction usage(){	echo -e "Usage:nt$0 DIR_NAME"	exit}# Check if user is rootif [ $(id -u) != "0" ]; then    echo "Error: You must be root to run this script, please use root to use it!!!"    exit 1fi#judge the argvif [ $# -ne 1 ]then 	echo "the usage of the command is ERROR!!!"        usagefidir_name=$1i=0if [ ! -d $dir_name ]then 	echo "the argv is not a direction!!!"		usageelse	cd $dir_name	echo "pwd: " `pwd`	du -ahS | sort -nr | 	while read line 	do			myline=`echo $line | awk '{print $2}'`		if [ -f $myline ] && [ $i -lt 5 ] 		then 			echo $line 			let i++ 		fi	done fi#!/bin/bash#command usage descriptionfunction usage(){	echo -e "Usage:nt$0 DIR_NAME"	exit}# Check if user is rootif [ $(id -u) != "0" ]; then    echo "Error: You must be root to run this script, please use root to use it!!!"    exit 1fi#judge the argvif [ $# -ne 1 ]then 	echo "the usage of the command is ERROR!!!"        usagefidir_name=$1i=0if [ ! -d $dir_name ]then 	echo "the argv is not a direction!!!"		usageelse	cd $dir_name	echo "pwd: " `pwd`	du -ahS | sort -nr | 	while read line 	do			myline=`echo $line | awk '{print $2}'`		if [ -f $myline ] && [ $i -lt 5 ] 		then 			echo $line 			let i++ 		fi	done fi

转载地址:http://wyxal.baihongyu.com/

你可能感兴趣的文章
探究电气设计系统中计算机的应用
查看>>
洛龙区:加快布局大数据产业
查看>>
看不见的"频谱"助力智慧城市建设
查看>>
软件测试文档写作——测试方案
查看>>
大数据的商业化:从数据、模型到业务逻辑
查看>>
Junit在MyEclipse上怎么用?
查看>>
能测试知多少--系统计数器与硬件分析
查看>>
颠覆传统 移动CRM成企业应用热点
查看>>
适合应用RFID的六大领域介绍
查看>>
《Web测试囧事》——2.6 时区不一致造成邮件发送异常
查看>>
需求管理是需求开发的基础
查看>>
干货:模板网站SEO优化技巧!
查看>>
CB Insights:2017年Q1网络安全领域共实现140宗投资
查看>>
安捷伦2016 Q2收入较去年增长6% 调升全年收入指导范围
查看>>
最新 Chrome 可让本地文件在网页应用中打开
查看>>
《Python地理空间分析指南(第2版)》——1.10 GIS中矢量数据的基本概念
查看>>
MySQL自动化运维工具 Inception
查看>>
QGraphicsItem如何使用信号/槽
查看>>
《计算机科学导论》一第2章
查看>>
分布式列式数据库 IndexR 开源啦!
查看>>