分享
 
 
 

Linux如何查找大文件或目录总结

王朝学院·作者佚名  2016-05-26
窄屏简体版  字體: |||超大  

linux如何查找大文件或目录总结 2015-04-04 11:34 by 潇湘隐者, ... 阅读, ... 评论, 收藏, 编辑 在Windows系统中,我们可以使用TreeSize工具查找一些大文件或文件夹,非常的方便高效,在Linux系统中,如何去搜索一些比较大的文件呢?下面我整理了一下在Linux系统中如何查找大文件或文件夹的方法。 1: 如何查找大文件? 其实很多时候,你需要了解当前系统下有哪些大文件,比如文件大小超过100M或1G(阀值视具体情况而定)。那么如何把这些大文件搜索出来呢?例如我要搜索当前目录下,超过800M大小的文件

[root@getlnx01 u03]# pwd

/u03

[root@getlnx01 u03]# find . -type f -size +800M

./Flash_recovery_area/backup/backupsets/ora_df873519197_s46815_s1

./flash_recovery_area/backup/backupsets/ora_df873523646_s46822_s1

./flash_recovery_area/backup/backupsets/ora_df873521714_s46818_s1

./flash_recovery_area/backup/backupsets/ora_df873522876_s46820_s1

./flash_recovery_area/backup/backupsets/ora_df873517396_s46813_s1

./flash_recovery_area/backup/backupsets/ora_df873523321_s46821_s1

./flash_recovery_area/backup/backupsets/ora_df873515765_s46811_s1

./flash_recovery_area/backup/backupsets/ora_df873520789_s46817_s1

./flash_recovery_area/backup/backupsets/ora_df873524162_s46823_s1

./flash_recovery_area/backup/backupsets/ora_df873518302_s46814_s1

./flash_recovery_area/backup/backupsets/ora_df873519953_s46816_s1

./flash_recovery_area/backup/backupsets/ora_df873516500_s46812_s1

./flash_recovery_area/backup/backupsets/ora_df873513413_s46809_s1

./flash_recovery_area/backup/backupsets/ora_df873514789_s46810_s1

./oradata/epps/invsubmat_d08.dbf

./oradata/epps/gmtinv_d08.dbf

./oradata/epps/gmtinv_x01.dbf

./oradata/epps/undotbs02.dbf

./oradata/epps/gmtinv_d07.dbf

./oradata/epps/undotbs01.dbf

./oradata/epps/gmtinv_x02.dbf

如上命令所示,我们仅仅能看到超过800M大小的文件的文件名称,但是对文件的信息(例如,文件大小、文件属性)一无所知,那么能否更详细显示一些文件属性或信息呢,当然可以,如下所示

[root@getlnx01 u03]# find . -type f -size +800M -PRint0 | xargs -0 ls -l

-rw-r----- 1 Oracle oinstall 2782846976 Mar 6 11:51 ./flash_recovery_area/backup/backupsets/ora_df873513413_s46809_s1

-rw-r----- 1 oracle oinstall 1878433792 Mar 6 11:53 ./flash_recovery_area/backup/backupsets/ora_df873514789_s46810_s1

-rw-r----- 1 oracle oinstall 1378492416 Mar 6 11:54 ./flash_recovery_area/backup/backupsets/ora_df873515765_s46811_s1

-rw-r----- 1 oracle oinstall 1641381888 Mar 6 11:56 ./flash_recovery_area/backup/backupsets/ora_df873516500_s46812_s1

-rw-r----- 1 oracle oinstall 1564065792 Mar 6 11:58 ./flash_recovery_area/backup/backupsets/ora_df873517396_s46813_s1

-rw-r----- 1 oracle oinstall 1663492096 Mar 6 12:00 ./flash_recovery_area/backup/backupsets/ora_df873518302_s46814_s1

-rw-r----- 1 oracle oinstall 1368244224 Mar 6 12:02 ./flash_recovery_area/backup/backupsets/ora_df873519197_s46815_s1

-rw-r----- 1 oracle oinstall 1629069312 Mar 6 12:04 ./flash_recovery_area/backup/backupsets/ora_df873519953_s46816_s1

-rw-r----- 1 oracle oinstall 1629954048 Mar 6 12:06 ./flash_recovery_area/backup/backupsets/ora_df873520789_s46817_s1

-rw-r----- 1 oracle oinstall 1202192384 Mar 6 12:07 ./flash_recovery_area/backup/backupsets/ora_df873521714_s46818_s1

-rw-r----- 1 oracle oinstall 1189388288 Mar 6 12:10 ./flash_recovery_area/backup/backupsets/ora_df873522876_s46820_s1

-rw-r----- 1 oracle oinstall 1089257472 Mar 6 12:11 ./flash_recovery_area/backup/backupsets/ora_df873523321_s46821_s1

-rw-r----- 1 oracle oinstall 1097687040 Mar 6 12:12 ./flash_recovery_area/backup/backupsets/ora_df873523646_s46822_s1

-rw-r----- 1 oracle oinstall 1051009024 Mar 6 12:13 ./flash_recovery_area/backup/backupsets/ora_df873524162_s46823_s1

-rw-r----- 1 oracle oinstall 4294975488 Apr 3 15:07 ./oradata/epps/gmtinv_d07.dbf

-rw-r----- 1 oracle oinstall 4194312192 Apr 1 22:36 ./oradata/epps/gmtinv_d08.dbf

-rw-r----- 1 oracle oinstall 4294975488 Apr 3 15:54 ./oradata/epps/gmtinv_x01.dbf

-rw-r----- 1 oracle oinstall 4294975488 Apr 3 15:57 ./oradata/epps/gmtinv_x02.dbf

-rw-r----- 1 oracle oinstall 4294975488 Apr 1 22:35 ./oradata/epps/invsubmat_d08.dbf

-rw-r----- 1 oracle oinstall 8589942784 Apr 4 09:55 ./oradata/epps/undotbs01.dbf

-rw-r----- 1 oracle oinstall 8589942784 Apr 4 09:15 ./oradata/epps/undotbs02.dbf

当我们只需要查找超过800M大小文件,并显示查找出来文件的具体大小,可以使用下面命令

[root@getlnx01 u03]# find . -type f -size +800M -print0 | xargs -0 du -h

1.3G ./flash_recovery_area/backup/backupsets/ora_df873519197_s46815_s1

1.1G ./flash_recovery_area/backup/backupsets/ora_df873523646_s46822_s1

1.2G ./flash_recovery_area/backup/backupsets/ora_df873521714_s46818_s1

1.2G ./flash_recovery_area/backup/backupsets/ora_df873522876_s46820_s1

1.5G ./flash_recovery_area/backup/backupsets/ora_df873517396_s46813_s1

1.1G ./flash_recovery_area/backup/backupsets/ora_df873523321_s46821_s1

1.3G ./flash_recovery_area/backup/backupsets/ora_df873515765_s46811_s1

1.6G ./flash_recovery_area/backup/backupsets/ora_df873520789_s46817_s1

1004M ./flash_recovery_area/backup/backupsets/ora_df873524162_s46823_s1

1.6G ./flash_recovery_area/backup/backupsets/ora_df873518302_s46814_s1

1.6G ./flash_recovery_area/backup/backupsets/ora_df873519953_s46816_s1

1.6G ./flash_recovery_area/backup/backupsets/ora_df873516500_s46812_s1

2.6G ./flash_recovery_area/backup/backupsets/ora_df873513413_s46809_s1

1.8G ./flash_recovery_area/backup/backupsets/ora_df873514789_s46810_s1

4.1G ./oradata/epps/invsubmat_d08.dbf

4.0G ./oradata/epps/gmtinv_d08.dbf

4.1G ./oradata/epps/gmtinv_x01.dbf

8.1G ./oradata/epps/undotbs02.dbf

4.1G ./oradata/epps/gmtinv_d07.dbf

8.1G ./orad

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有