Linux find files larger than

Searching for files in Linux in general is quite easy with the find command, which has built-in tools for finding files larger than a certain size, for example:

find / -type f -size +10M

The above example will find all our files larger than a certain size, which is somewhat acceptable, but we are generally interested in the entire path of the file separately, that if you try the above example, you will receive a lot of error messages due to access problems or files forbidden to read. In general, the solution of the relevant 2 the problem is easily done by completing the above command as follows:

find / -type f -size +10M -exec ls -lh {} \; 2> /dev/null | awk '{ print $NF ": " $5 }'



Leave a Reply

Your email address will not be published. Required fields are marked *

Anti SPAM *