Files
doc-exports/docs/ims/umn/en-us_topic_0125076462.html
guoyanyan c4cb455200 ims_umn_1109
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-03-01 01:32:08 +00:00

3.4 KiB

Clearing System Logs

Delete log files and historical records, and stop the ECS.

  1. Run the following commands to delete redundant key files:

    echo > /$path/$to/$root/.ssh/authorized_keys

    An example command is echo > /root/.ssh/authorized_keys.

    echo > /$path/$to/$none-root/.ssh/authorized_keys

    An example command is echo > /home/linux/.ssh/authorized_keys.

  1. Run the following command to clear log files in the /var/log directory:

    rm -rf /var/log/*

    Before deleting log files, back up log directories and log files required by application startup. For example, if the default Nginx log directory /var/log/nginx is deleted, Nginx may fail to be started.

  2. Run the following commands to delete historical records:

    echo > /root/.bash_history

    history -c