CTMLOG Utility to cleardown Logs

A lot of scripts ans example to extract information from Control-M tools.
Post Reply
User avatar
karan
Nouveau
Nouveau
Posts: 20
Joined: 25 May 2011 12:00

CTMLOG Utility to cleardown Logs

Post by karan » 11 Jul 2013 2:10

Hi

I want to clear files with the name of "Log_yymmdd" under /tmp Dir using ctmlog. The command should be able to clear files that are a week old.

Please help.

User avatar
Manii
Nouveau
Nouveau
Posts: 46
Joined: 28 Jul 2011 12:00

Post by Manii » 22 Jul 2013 5:05

Hi Karan,

below is the command to delete the files older than 7 days under temp directory , you dont need to give the file name

find /tmp -type f -mtime +7 -exec rm -rf {} \;

This is not CTM utility , It OS native command find and delete the files

=======================
however ctmlog utility will be run as follow
Command - ctmlog delete YYYYMMDD HHMM YYYYMMDD HHMM

Exp :- ctmlog delete 20130720 0000 20130721 0000

output of above would be :-

CTMLOG:Log was successfully deleted.

Post Reply