Wednesday, May 26, 2010

Find files of particular size

Use find with the size option. The size option takes one argument. -5000k means less than while +5000k means greater than 5MB.

Examples -

To find mp3 files of size < 5 MB
$ find /mp3collection -name '*.mp3' -size -5000k




To find file of size > 10MB
$ find / -size +10000k



To find file of size > 180MB but < 190 MB.
For example if I want to find files for the Friends episodes in my hard disk which I know are approx. ~ 185MB.

$ find / -size +180000k -and -190000k



Practice -

Guess what the following command does?
$ find /mp3-collection -name 'Metallica*' -and -size +10000k


For more, see http://www.codecoffee.com/tipsforlinux/articles/21.html

No comments:

OK GOOGLE on Samsung Galaxy S7 doesn’t work

To make Ok Google detection work on Galaxy S7 (Galaxy series phones) we need to perform a couple of steps. 1. As long as Samsung S vo...