Score:-1

Linux Delete Files Older Than and the Same Time Smaller Than

cz flag

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!

Score:1
in flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.