find files by size

On a server, i wanted to find all log files that are larger than 1 GB in size, to do this, run

find /path/ -size +1G

Example

find /var/www/clients/ -name "error.log" -size +1G

To find files older than 100 days, run

find /var/www/clients/ -name "error.log" -mtime +100 -size +1G

See find

Need help with Linux Server or WordPress? We can help!

Leave a Reply

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