WebHosting

Tuesday, December 11, 2012

Find file of specific size Linux

Some time you many need to find all files greater than equal to specific size like 1MB 10 MB or 1GB, so you can use following command to get the files have length more than equal to you have specified:

find / -type f -size <GIVE SIZE HERE IN KB> -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'

Example:

find / -type f -size +1048576k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'


This will find files greater than size 1GB. so you can experiment with the size as you need.

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

Error Message in DBeaver connecting using jdbc: Public Key Retrieval is not allowed

Fixing “Public Key Retrieval is not allowed” Error in MySQL with DBeaver   If you are trying to connect MySQL 8+ with DBeaver and suddenly...