Clear All LOG Files
Hello. Is there a way from the command line to clear all log files (*.log and *_log)? I am in the process of moving several sites to a new server and the log files, which will be maintained on the old server, are huge. Thanks
OS - Centos 5 |
Assuming clear means remove and not empty. The find command would do it e.g.
Code:
find /some/location -type f -name "*.log" -exec rm {} \; |
or if you do mean to just empty them
Code:
find /some/location -type f -name "*.log" -exec cat /dev/null > {} \; |
All times are GMT -5. The time now is 07:18 PM. |