Page 1 of 1

CTMLOG Utility to cleardown Logs

Posted: 11 Jul 2013 2:10
by karan
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.

Posted: 22 Jul 2013 5:05
by Manii
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.