[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] Delete from UNIX after N days



Hi,

I've got a script that runs nightly and adds a new file to the output
directory each time it runs.  I've been asked to have the SQR delete
existing files that are more than 5 days old.

If I were doing this in UNIX directly, I would write:

  find /work8/outdir/names -type f -ctime +5 -exec rm {} \;

I tried the following in SQR:

  let $DelCommand = 'find work8/outdir/names -type f -ctime +5 -exec rm {}
\;'
  call SYSTEM using $DelCommand #status

SQR thinks that {} is a substitution variable and errors out.
Can anyone recommend an alternative method?

Thanks,
KC
-- 
Kristin Cagan
Champion Strategeis, Inc.
kcagan@pobox.com


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users