• Về minhduy.vn
  • Đăng ký Hosting
  • Thiết kế Website
  • Khuyến mãi HOT
Hướng Dẫn Sử Dụng Dịch Vụ - Minh Duy Solutions
  • Trang chủ
  • Hosting
    • Hướng dẫn Hosting cPanel
    • Hướng dẫn Hosting DirectAdmin
  • Tên miền
  • Website
    • Hướng dẫn WordPress
    • Hướng dẫn Webmaster
  • Email Doanh Nghiệp
    • Office 365
    • Google Work Space
    • Email Zimbra
  • VPS – Máy chủ
    • Hướng dẫn Linux
    • Hướng dẫn DirectAdmin
  • Hướng dẫn chung
  • Góc ICT
No Result
View All Result
  • Trang chủ
  • Hosting
    • Hướng dẫn Hosting cPanel
    • Hướng dẫn Hosting DirectAdmin
  • Tên miền
  • Website
    • Hướng dẫn WordPress
    • Hướng dẫn Webmaster
  • Email Doanh Nghiệp
    • Office 365
    • Google Work Space
    • Email Zimbra
  • VPS – Máy chủ
    • Hướng dẫn Linux
    • Hướng dẫn DirectAdmin
  • Hướng dẫn chung
  • Góc ICT
No Result
View All Result
Hướng Dẫn Sử Dụng Dịch Vụ - Minh Duy Solutions
No Result
View All Result
Home Hướng dẫn Hosting Hướng dẫn Hosting cPanel

Hướng dẫn xoá cPanel Logs trong 1 câu lệnh

Minh Duy Solutions by Minh Duy Solutions
09/08/2024
Reading Time: 2 mins read
148 6
A A
0
cPanel and whm
476
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter

Hướng dẫn xoá cPanel Logs trong 1 câu lệnh

This tutorial is meant to provide a shortcut to clean your log files in a cPanel Dedicated Server or a cPanel Linux VPS.

**Disclaimer** Prior to erasing permanently your log files, you need to insure that there isn’t critical problems parsed in the logs that would need to be issued promptly.

We are going to create a shell script that will through SSH clean the logs files in launching the script.

1) Login to your VPS in SSH with Putty or any SSH client

2) Create a folder where you’ll place your customs script (it allows you to stay organized), typing the following command:

mkdir /customscripts

3) Create and edit a file with the following command

vi /customscripts/logs

** i to start editing
** esc to quit editing

4) Copy / Paste the following :

echo > /usr/local/apache/logs/error_log
echo > /usr/local/apache/logs/access_log
echo > /usr/local/apache/logs/access_log
echo > /usr/local/apache/logs/error_log
echo > /usr/local/cpanel/logs/access_log
echo > /usr/local/cpanel/logs/error_log
echo > /var/log/exim_mainlog
echo > /var/log/exim_rejectlog
echo > /var/log/maillog
echo > /var/log/messages
echo > /var/log/messages.1
echo > /var/log/maillog.1

5) Push the esc button and type :wq! with “:” included to save the file

6) We need to give the authorization to the script to perform the task with the following command

chmod 755 logs

7) Let’s run the script and clean your logs files!

./logs
4/5 - (104 bình chọn)
Tags: cPanellogxoá log
Share190Tweet119
Minh Duy Solutions

Minh Duy Solutions

Bài viết liên quan

huong dan cai dat ssl mien phi tren cpanel 4484
Hướng dẫn Hosting cPanel

Hướng dẫn cài đặt SSL miễn phí trên cPanel

19/03/2025
1.5k
number of processes tren hosting la gi 3905 1
Hướng dẫn Hosting cPanel

Number Of Processes Trên Hosting là gì?

07/08/2023
1.6k
cPanel Jupiter Theme Available
Hướng dẫn Hosting cPanel

Hướng dẫn sử dụng cPanel với giao diện Jupiter

10/03/2023
1.6k
Git cPanel
Hướng dẫn Hosting cPanel

Hướng dẫn dùng Git trên Hosting cPanel

01/02/2023
1.6k
what is cpanel
Hướng dẫn Hosting cPanel

Vô hiệu hóa spam mail trên cPanel Account

01/02/2023
1.5k
cPanel vs DirectAdmin
Hướng dẫn Hosting cPanel

Hướng dẫn di chuyển DirectAdmin sang cPanel

14/07/2022
1.8k

Để lại một bình luận Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

No Result
View All Result

Recommended.

outlook la gi cach cai dat va su dung outlook cho nguoi moi bat dau

Thêm tài khoản email bằng cách dùng thiết lập nâng cao với ứng dụng Outlook

22/09/2021
1.6k
Custom Taxonomy trong WordPress

Cách tạo Custom Taxonomy trong WordPress

28/10/2024
1.9k

Trending.

outlook là gì

Tạo rules trên Microsoft Outlook

29/05/2026
1.5k
outlook la gi cach cai dat va su dung outlook cho nguoi moi bat dau

Thay đổi thời gian cập nhật gửi nhận Email mới trên Outlook

29/05/2026
1.5k
cach tai toan bo email tren gmail ve may tinh de luu tru 4763

Cách tải toàn bộ email trên Gmail về máy tính để lưu trữ

10/04/2026
1.5k
Tên miền website là gì?

Vòng đời tên miền Việt Nam và Quốc Tế cập nhật năm 2026

07/04/2026
1.5k
binhluan

Cách ẩn comment trên Fanpage để tránh bị cướp khách hàng

09/12/2025
1.5k
Wiki Minh Duy Solutions

WIKI.MINHDUY.VN

Chuyên trang hướng dẫn sử dụng dịch vụ của Minh Duy Solutions

DMCA.com Protection Status

Danh mục

  • GSuite
  • aaPanel
  • Góc ICT
  • Thiết Kế Đồ Hoạ
  • SEO
  • Hướng dẫn WHMCS
  • Hướng dẫn WordPress
  • Email Zimbra
  • Hướng dẫn DirectAdmin
  • Hướng dẫn Hosting cPanel
  • Hướng dẫn Hosting
  • Office 365
  • Hướng dẫn Website
  • Hướng dẫn Linux
  • Hướng dẫn Hosting DirectAdmin
  • Google Work Space
  • Hướng dẫn Webmaster
  • Hướng dẫn máy chủ
  • Hướng dẫn Email Doanh Nghiệp
  • Hướng dẫn Tên miền
  • Hướng dẫn chung
  • Uncategorized

Thẻ

AFC apt-get update apt-get upgrade category chủ thể cPanel debian DirectAdmin email doanh nghiệp Environment Variables giải nén Google Workspace G Suite hosting ioncube khôi phục mật khẩu linux nginx nmap nodejs npm Office 365 OneDrive Outlook out of memory path Paypal phpmyadmin SMTP. GMail SSH sudo swap Symbolic Link tar tar.gz thông báo tên miền tên miền ubuntu user whois WooCommerce WordPress wordpress cơ bản wp rocket Zimbra
  • Về minhduy.vn
  • Đăng ký Hosting
  • Thiết kế Website
  • Khuyến mãi HOT

Copyright © Hướng dẫn Minh Duy Solutions

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
×
    No Result
    View All Result
    • Trang chủ
    • Hosting
      • Hướng dẫn Hosting cPanel
      • Hướng dẫn Hosting DirectAdmin
    • Tên miền
    • Website
      • Hướng dẫn WordPress
      • Hướng dẫn Webmaster
    • Email Doanh Nghiệp
      • Office 365
      • Google Work Space
      • Email Zimbra
    • VPS – Máy chủ
      • Hướng dẫn Linux
      • Hướng dẫn DirectAdmin
    • Hướng dẫn chung
    • Góc ICT

    Copyright © Hướng dẫn Minh Duy Solutions