Find filename recursively on terminal

Find by filename

find . -name xxx.txt
find /directory -name "xxx.txt"
find . -print | grep -i "xxx.txt"

 

 Find by size

find . -type f -size +50K
find . -type f -size +50M
find . -type f -size +50M -exec ls -lh {} \; | awk '{print $9 ": " $5}'

Find by size using disk usage

du -xakh . | sort -n
du -xakh . | sort -n | tail -50

Leave a Reply

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

Scroll to top