-1

I use this command to delete MP3 files older than 90 days.

find MP3/ -type f -name "*.mp3" -mtime +90 -delete

I want to make it delete those older than 3 days but with file size less than 100KB.

How to write the arguments for < 100KB and is -size good to go or should I use something else as as far as I know the file size itself is different that the size on the disk...

find MP3/ -type f -name "*.mp3" -mtime +3 -size xxx -delete

Thanks a lot!

medk
  • 111
  • 1
  • 7

1 Answers1

1

You can use + and - signs with size, just as with mtime, so simply use size -100k.

Lacek
  • 7,233
  • 24
  • 28