Skip to content
Advertisement

Find workspace and delete everything with the name, except for filename and everything in a directory pattern

I’m trying to create a cronjob that will delete everything with a pattern *.jar, except for master.jar and anything in a directory pattern */jarkeeper/*/staging/*

I’m close but not luck in finding the correct command. Here’s what i have so far:

JavaScript

and

JavaScript

What should the correct format be?

Advertisement

Answer

The issue looks like you are using -or as opposed to -or. I would also suggest using -path as opposed to -name throughout to keep everything consistent and so:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement