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.
CTMLOG Utility to cleardown Logs
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.
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.