Advanced Finding Files in Linux / Ubuntu

2014-03-17 | #solution, #ubuntu

Finding files is as easy as typing "find" on the shell, but here are some reference examples with a little more complex conditions:

find . -type f -size -4850k -name '*-2.mp4' -exec ls -lh {} \;

//find all mp4s ending with -2, being smaller than 4.85k in current dir and print readable

find . -type f -size +5M -name '*.jpg' -exec rm -f {} \;

//find all jpgs being bigger than 5MB in current dir and remove