Hi, Say I''ve got a directory full of stale Tomcat temp files of the form: /usr/local/blackboard/apps/tomcat/work/Catalina/localhost/webapps_assessment/strts6866.tmp and I want to delete any files that haven''t changed in a week and not keep any backup. Should this get rid of them: tidy { "/usr/local/blackboard/apps/tomcat/work/Catalina/localhost/webapps_assessment": age => "1w", backup => false, type => mtime, } ? It doesn''t appear to. Am I missing ''recurse => true''? What''s the syntax & quoting for ''age''? quoted, no space : "1w" unquoted, no space : 1w quoted, with space : "1 w" unquoted, with space: 1 w Can I wildcard the files to tidy? Note that the nice people who made Tomcat/Struts/whatever hide a "tldCache.ser" file in with all the stale "strts####.tmp" files and it''d be nice to kill only the temp files. Essentially, I''m looking for a way to do /usr/bin/find /usr/local/blackboard/apps/tomcat/work/Catalina/localhost/webapps_assessment -name "strts*.tmp" -type f -mtime +7 -print0 | /usr/bin/xargs -0 /bin/rm but in the Puppet idiom. -- Bob PS.: For any of you also managing Blackboard, I feel your pain.
On 15 May , 2007, at 19:48, Bob Apthorpe wrote:> Should this get rid of them: > > tidy { > "/usr/local/blackboard/apps/tomcat/work/Catalina/localhost/ > webapps_assessment": > age => "1w", > backup => false, > type => mtime, > } > > ? It doesn''t appear to.I''m looking into this and I''ll have an answer to your question shortly.
On 15 May , 2007, at 19:48, Bob Apthorpe wrote:> Am I missing ''recurse => true''?Yes, add a recurse, as well as: path => "/usr/local/blackboard/apps/tomcat/Catalina/localhost/ webapps_assessment"> > What''s the syntax & quoting for ''age''? > quoted, no space : "1w" > unquoted, no space : 1w > quoted, with space : "1 w" > unquoted, with space: 1 wFor the sake of convention, I think quoted with no spaces is best: "1w"
On May 16, 2007, at 12:32 PM, Benjamin C. Kite wrote:> >> >> What''s the syntax & quoting for ''age''? >> quoted, no space : "1w" >> unquoted, no space : 1w >> quoted, with space : "1 w" >> unquoted, with space: 1 w > > For the sake of convention, I think quoted with no spaces is best: > "1w"From the code, it looks like no spaces are allowed. -- Millions long for immortality who do not know what to do with themselves on a rainy Sunday afternoon. -- Susan Ertz --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On 16/05/07, Luke Kanies <luke@madstop.com> wrote:> On May 16, 2007, at 12:32 PM, Benjamin C. Kite wrote: > > > >> > >> What''s the syntax & quoting for ''age''? > >> quoted, no space : "1w" > >> unquoted, no space : 1w > >> quoted, with space : "1 w" > >> unquoted, with space: 1 w > > > > For the sake of convention, I think quoted with no spaces is best: > > "1w" > > From the code, it looks like no spaces are allowed. >Small hijack for a slightly related question: does the timeout also accept values like these? I.e. can I say something like ''timeout => "60s"'' or ''timeout => "3m"'' ? Or does it have a fixed size like seconds or minutes? Thanks, Thijs
On May 24, 2007, at 6:10 AM, Thijs Oppermann wrote:> Small hijack for a slightly related question: does the timeout also > accept values like these? I.e. can I say something like ''timeout => > "60s"'' or ''timeout => "3m"'' ? > Or does it have a fixed size like seconds or minutes?I think the timeout is fixed in seconds. We should have a standard timing type, though. Volunteers...? -- Progress isn''t made by early risers. It''s made by lazy men trying to find easier ways to do something. --Robert Heinlein --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Reasonably Related Threads
- Installing puppetmasterd, puppetd as services under Red Hat, CentOS
- R2html and Blackboard LMS : solved
- [Bug 2375] Support (a la Gnu tar) for --directory DIR
- Best practice: how to set up mountpoints?
- Best Practice: how to organize puppetmaster directories?