Find all the large files on linux server - Linux

To list the files larger than 20MB use the following command in your terminal


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


The output will be something like this....


/home/fileName.sql.gz: 160M
/var/www/fileName.tar.gz: 82M
/var/www/Directory/Path/FileName.tar.gz: 82M
...
..
.



This will find all the gz files. To find the files of all the type, use "*" only.


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

Comments

Popular posts from this blog

How to Reset Root Password in Drupal 7 with phpMyAdmin

Drupal - Hiding field group and its Children