Summery of this thread
List and Delete
Unix/LinuxList files that are older than 'n' daysfind path_to_logs_directory -type f -mtime +n -exec ls -l '{}' \;
delete files that are older than 'n' daysfind path_to_logs_directory -type f -mtime +n -exec rm -v '{}' \;
WindowsList files that are older than 'n' daysforfiles -p "path_to_logs_directory" -s -m *.* -d -n -c "cmd /c echo @file"
delete files that are older than 'n' daysforfiles -p "path_to_logs_directory" -s -m *.* -d -n -c "cmd /c del @path"
Scheduling cleaning jobs- Unix/Linux you can use 'crontab' to schedule the above commands to run everyday/week etc... Check the following link for CRONTAB (
websphereapplicationservernotes.wordpres...)
-WindowsPut the above delete command in a batch file (.bat)
Create windws job/tasks to run the batch file