find big file
- #!/bin/bash
- #command usage description
- function usage()
- {
- echo -e "Usage:nt$0 DIR_NAME"
- exit
- }
- # Check if user is root
- if [ $(id -u) != "0" ]; then
- echo "Error: You must be root to run this script, please use root to use it!!!"
- exit 1
- fi
- #judge the argv
- if [ $# -ne 1 ]
- then
- echo "the usage of the command is ERROR!!!"
- usage
- fi
- dir_name=$1
- i=0
- if [ ! -d $dir_name ]
- then
- echo "the argv is not a direction!!!"
- usage
- else
- 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 description
- function usage()
- {
- echo -e "Usage:nt$0 DIR_NAME"
- exit
- }
- # Check if user is root
- if [ $(id -u) != "0" ]; then
- echo "Error: You must be root to run this script, please use root to use it!!!"
- exit 1
- fi
- #judge the argv
- if [ $# -ne 1 ]
- then
- echo "the usage of the command is ERROR!!!"
- usage
- fi
- dir_name=$1
- i=0
- if [ ! -d $dir_name ]
- then
- echo "the argv is not a direction!!!"
- usage
- else
- 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
find big file的更多相关文章
- 记一个mvn奇怪错误: Archive for required library: 'D:/mvn/repos/junit/junit/3.8.1/junit-3.8.1.jar' in project 'xxx' cannot be read or is not a valid ZIP file
我的maven 项目有一个红色感叹号, 而且Problems 存在 errors : Description Resource Path Location Type Archive for requi ...
- HTML中上传与读取图片或文件(input file)----在路上(25)
input file相关知识简例 在此介绍的input file相关知识为: 上传照片及文件,其中包括单次上传.批量上传.删除照片.增加照片.读取图片.对上传的图片或文件的判断,比如限制图片的张数.限 ...
- logstash file输入,无输出原因与解决办法
1.现象 很多同学在用logstash input 为file的时候,经常会出现如下问题:配置文件无误,logstash有时一直停留在等待输入的界面 2.解释 logstash作为日志分析的管道,在实 ...
- input[tyle="file"]样式修改及上传文件名显示
默认的上传样式我们总觉得不太好看,根据需求总想改成和上下结构统一的风格…… 实现方法和思路: 1.在input元素外加a超链接标签 2.给a标签设置按钮样式 3.设置input[type='file' ...
- .NET平台开源项目速览(16)C#写PDF文件类库PDF File Writer介绍
1年前,我在文章:这些.NET开源项目你知道吗?.NET平台开源文档与报表处理组件集合(三)中(第9个项目),给大家推荐了一个开源免费的PDF读写组件 PDFSharp,PDFSharp我2年前就看过 ...
- [笔记]HAproxy reload config file with uninterrupt session
HAProxy is a high performance load balancer. It is very light-weight, and free, making it a great op ...
- VSCode调试go语言出现:exec: "gcc": executable file not found in %PATH%
1.问题描述 由于安装VS15 Preview 5,搞的系统由重新安装一次:在用vscdoe编译go语言时,出现以下问题: # odbcexec: "gcc": executabl ...
- input type='file'上传控件假样式
采用bootstrap框架样式 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> &l ...
- FILE文件流的中fopen、fread、fseek、fclose的使用
FILE文件流用于对文件的快速操作,主要的操作函数有fopen.fseek.fread.fclose,在对文件结构比较清楚时使用这几个函数会比较快捷的得到文件中具体位置的数据,提取对我们有用的信息,满 ...
- ILJMALL project过程中遇到Fragment嵌套问题:IllegalArgumentException: Binary XML file line #23: Duplicate id
出现场景:当点击"分类"再返回"首页"时,发生error退出 BUG描述:Caused by: java.lang.IllegalArgumentExcep ...
随机推荐
- HDU 4294 A Famous Equation(DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4249 题目大意:给一个a+b=c的表达式,但是a.b.c中部分位的数字丢失,并用?代替,问有多少种方案 ...
- 【制作镜像】安装VMwareTool
vmware tools是虚拟机VMware Workstation自带的一款工具,它的作用就是使用户可以从物理主机直接往虚拟机里面拖文件. 启动虚拟机,切换到xwindows 在VMware Wor ...
- win8.1企业版更新到win10解决方案
最近想把自己的win8.1更新成win10,发现月底就要免费更新了,由于我的电脑是企业版,官方不提供企业版的免费升级,所以用电脑管家或者360老是提示不对.我就百度了在注册表里面改成了专业版的,接着继 ...
- .net闭包的应用
这里体现出闭包的数据共享 , , , , , , , , , }; ; ; values.ToList().ForEach(s => result1 += s); values.ToList() ...
- Java并发编程二三事
Java并发编程二三事 转自我的Github 近日重新翻了一下<Java Concurrency in Practice>故以此文记之. 我觉得Java的并发可以从下面三个点去理解: * ...
- PHP-Wamp集成包安装教程
在Windows平台上搭建PHP的开发环境可以下载WAMP(Windows.Apache.MySQL.PHP的首字母缩写)集成化安装包.这样就不需要单独安装Apache.MySQL和PHP了. 这款软 ...
- jquery插件----文件上传uploadfile
使用了一款jquery上传的插件,ajax上传,可以显示上传的进度,高可配性,简要记录. 插件地址http://hayageek.com/docs/jquery-upload-file.php git ...
- Android 自定义View实现单击和双击事件
自定义View, 1. 自定义一个Runnable线程TouchEventCountThread , 用来统计500ms内的点击次数 2. 在MyView中的 onTouchEvent 中调用 上面 ...
- word中几个好用的宏代码(立方米上标、关闭样式自动更新、删除无效样式、表格加粗边框、宋体引号)
Sub 替换立方米() With Selection.Find .Text = "m3" .Replacement.Text = "mm3" .Forward ...
- 浅谈JavaScript词法分析步骤
JavaScript代码运行前有一个类似编译的过程即词法分析,词法分析主要有三个步骤: 分析参数 再分析变量的声明 分析函数声明 具体步骤如下: 函数在运行的瞬间,生成一个活动对象(Active Ob ...