Skip to content

Categories:

Deleting old files excluding some directories

find -mtime +365 | grep -v dir1 | grep -v dir2 | xargs /bin/rm

Probably there’s some way of having find do the directory exclusions, but this was way easier to think of.

Posted in Uncategorized.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.