㈠ 从根目录查找大于50MB的文件,并按大小列表显示前10个:

# find / -printf "%k %p\n"|sort -g -k 1,1|\awk '{if($1>50000) print $1/1024 "MB" " " $2}'|tail -n 10

111.968MB /mnt/hgfs/vmshare/Disk1/oms/Disk1/stage/Components/oracle.sysman.agent.download/10.2.0.1.0/1/DataFiles/filegroup5.1.1.jar
250.258MB /u01/app/oracle/flash_recovery_area/ORACLE10G/datafile/o1_mf_sysaux_8p06vgsb_.dbf
260.266MB /u01/app/oracle/oradata/oracle10/sysaux01.dbf
318.878MB /mnt/hgfs/vmshare/10201_database_linux32.zip
350.157MB /mnt/hgfs/vmshare/B24219-01_4of6.zip
467.697MB /mnt/hgfs/vmshare/linux_11gR2_grid.zip
480.48MB /u01/app/oracle/flash_recovery_area/ORACLE10G/datafile/o1_mf_system_8p06t0nt_.dbf
480.48MB /u01/app/oracle/oradata/oracle10/system01.dbf
1500MB /mnt/hgfs/vmshare/vm/vm01.img
1677.5MB /mnt/hgfs/vmshare/rhel-server-5.8-i386-dvd.iso

㈡ 从当前目录开始, 查找本目录下大于10M的文件并显示详细信息:

# find . -size +10000000c -exec ls -lh {} \;

-rw-r----- 1 oracle oinstall 26M Apr 9 2013 ./oracle10/undotbs01.dbf
-rw-r----- 1 oracle oinstall 261M Apr 9 2013 ./oracle10/sysaux01.dbf
-rw-r----- 1 oracle oinstall 51M Apr 9 2013 ./oracle10/redo02.log
-rw-r----- 1 oracle oinstall 21M Apr 8 2013 ./oracle10/temp01.dbf
-rw-r----- 1 oracle oinstall 51M Apr 8 2013 ./oracle10/redo03.log
-rw-r----- 1 oracle oinstall 481M Apr 9 2013 ./oracle10/system01.dbf
-rw-r----- 1 oracle oinstall 51M Apr 8 2013 ./oracle10/redo01.log

请为这篇文章评分:
( 已有 2 人评分, 平均得分: 4.5 分 )

Tags: linux

Related Posts:

发表评论