Friday, November 12, 2010

How to find files in Ubuntu using Terminal

Case insensitive searches can be achieved by using the -iname switch

find /home -iname '*.mpg' -o -iname '*.avi'


Let'search for .avi files bigger than 700M. This can be done with.

find /home/ -name '*.avi' -a -size +700M


Now, let's find the same subset of files that were modified less than 15 days ago

find /home/ -name '*.avi' -a -size +700M -mtime -15

No comments: