I'm trying to write a scenario which will input a number and then find all the files which size if bigger than this number.
So far I've got this:
read $size
find . -size "+{$size}c"
The above code doesn't work. What should I do instead?
You can do something like this to find files bigger than your number in the variable -
find . -size +"${size}"c
You can also do something like this -
awk -v mysize="$size" '{if ($5>=mysize) print $9}' <(ls -l)
You can modify ls -l to provide path of a particular folder and add more options to doing search recursively.