Sunday, 13 December 2015

Search Files Based On SIZE In Unix/Linux

In this article, We will see how find search the files based SIZE criteria. Before you start this article please go through the following article  Basics of FIND Command In Unix/Linux for basics if you have already not followed.

SYNTAX:
find <path> -size [Size]
-(Minus) Less Than The Given Size.
+(Plus)  More Than The Given Size.
No Sign  Exact match.


Finding files whose size is exactly 15MB
$ find . -size 15M
Output: List down all the files of size 15MB.


Finding files larger than 15MB size
$ find . -size +15M
Output: List down all the files of size greater than 15MB.


Finding files smaller than 15MB size
$ find . -size -15M
Output: List down all the files of size less than 15MB.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...