Search for files with certain size and extension

I was looking for a large PDF file that was above 100 MB. The file was inside thousands of other files and folders, so I used this command to find it:

find . -type f -size +100M | grep -i pdf

The above simply used the find utility and specified that this is a file and that file is > 100 MB, then I used grep to filter PDF files, that’s it!

Enjoy!

Sources:
https://ostechnix.com/find-files-bigger-smaller-x-size-linux/

About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s