#!/bin/bash
find $1 -size +${2}c -size -${3}c
|___| |_____| |_____|
| | |
This is the This is This is the
first argument the second third argument
passed while argument
running the
script
find utility syntax is to search specified path for files which can be identified depending on the options chosen.
-size n[ckMGTP]
True if the file's size, rounded up, in 512-byte blocks is n.
If n is followed by a c, then the primary is true if the
file's size is n bytes (characters).
Using + in front of second argument means we are looking for files greater then the number specified. Similarly - means the files to be displayed should be less than the size specified.
By passing three arguments to your script, means we are giving $1 as the path to be searched which in your case is /home/Desktop/file. The second argument defines the condition that files should be greater than the specified argument which is 5000. The final argument is for specifying that the files should be less than the specified size which is 10000.
Hope this helps!