Find Large Files In Linux

by lifeLinux on May 13, 2011

Find files larger than a certain size

This example finds all the files under /root directory which are larger than 50k

[root@lifelinux ~]# find /root -size +50k

Sample output


Find files within specified size limits

Example, type the following command to limit the search to find only files with the size of 50k to 100k

[root@lifelinux ~]# find /var/log -size +50k -size -100k

Sample output


If you want to list them with ls, type the following command

[root@lifelinux ~]# find /var/log -size +50k -size -100k -exec ls -lha {} \;

Sample output

-rw------- 1 root root 59K Apr 30 22:01 /var/log/secure.2
-rw-r--r-- 1 root root 54K May 13 23:05 /var/log/munin/munin-node.log
-rw-r--r-- 1 munin munin 94K May 13 23:05 /var/log/munin/munin-limits.log

Further readings

Find command

Related Posts:

Previous post:

Next post: