Score:-4

How can I delete all .mp3 files in the current linux directory that are older than 365 days?

in flag

How can I delete all .mp3 files in the current linux directory that are older than 365 days?

I am looking for a shell command I can use to do this. There are other files in this directory that I don't want to be deleted.

Thank you.

Someone avatar
my flag
It is a duplicate
Score:0
it flag

Read man find and do something like this (remove echo when you like the results):

find . -maxdepth 1 -type f -name '*.mp3' -mtime +365 -print0 |\ xargs -0 -r echo rm
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.