Link to home
Start Free TrialLog in
Avatar of kingpin200004
kingpin200004

asked on

Remove all jpegs les than 1k from a folder

Hi i am new to linux so sorry for the no braner question but how do i remove all jpg files less than 1k from a spesific folder?
its to go in a cron script
thanks for you help
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also if You expect large number of files in one run, You can speed it up with
find /dir -name '*.jpg' -size -1k -printf "'%p'\n" | xargs rm -f