• 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 Website Hướng dẫn WHMCS

Hướng dẫn xóa tất cả file error_log trên cPanel WHM

Minh Duy Solutions by Minh Duy Solutions
09/08/2024
Reading Time: 2 mins read
A A
0
cPanel and whm
471
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter
4.5/5 - (185 bình chọn)

Hướng dẫn xóa tất cả file error_log trên cPanel WHM

This command will search in all /home/*/public_html directories (also in subdirectories) for error_log files:

find /home/*/public_html -type f -name error_log -exec du -sh {} \;

Usage example:

root@web [~]# find /home/*/public_html -type f -name error_log -exec du -sh {} \;
4.0K    /home/tolomike/public_html/error_log
4.0K    /home/tolomike/public_html/wp-includes/ID3/error_log
9.0K    /home/tolomike/public_html/wp-includes/theme-compat/error_log
4.0K    /home/tolomike/public_html/wp-includes/SimplePie/error_log
4.0K    /home/tolomike/public_html/wp-includes/SimplePie/Cache/error_log
root@web [~]# 

Many times you will want to see the error+log files that use the most space. For this, sort the results. The command is:

find /home/*/public_html -type f -name error_log -exec du -sh {} \; | sort -n

You need to list only the error_log files bigger than 50MB? Use this command:

find /home/*/public_html -type f -name error_log -size +50000k -exec du -sh {} \;
Notice that depending on your number of files and accounts, these commands can run for a long time.

Now let’s see how we delete these files.
To delete all the founded error_log files, use:

find /home/*/public_html -type f -iname error_log -delete

To delete error_log files larger than 50MB, use:

find /home/*/public_html -type f -iname error_log -size +50000k -delete

Want to add a cron job that will delete error_log files? Use the crontab -e command to edit the server jobs.

crontab -e

Then add the line (the cron job will run every day at 02:30):

30 2 * * * find /home/*/public_html -type f -name error_log -delete

Exit the crontab editor by CTRL+X. Confirm the changes.

Tags: cPanelWHMerror_log
Share188Tweet118
Minh Duy Solutions

Minh Duy Solutions

Bài viết liên quan

debug mode wp
Uncategorized

Hướng dẫn bật WordPress Debug

14/03/2023
1.6k
directadmin
Hướng dẫn DirectAdmin

Tắt tính năng tự động cài SSL trên DirectAdmin

28/05/2022
1.6k
smtp la gi 1
Uncategorized

Cấu hình SMTP cho WordPress mà không cần dùng plugin

12/03/2022
1.6k
doi dns google tren macbook
Hướng dẫn Webmaster

Đổi DNS Google trên Macbook

05/03/2022
1.9k
huong dan dang ky github education pack
Uncategorized

Hướng dẫn đăng ký Github Education Pack

21/02/2022
3k
Uncategorized

Tự động scan .htaccess trên DirectAdmin khi dùng OpenLiteSpeed webserver

26/11/2021
1.7k

Để 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.

DirectAdmin

Bật Tính Năng Cho Phép Đổi Mật Khẩu Email Roundcube Trên DirectAdmin

22/11/2021
1.5k
chuyen gia san pham ve nam tren nut add to cart voi website wordpress va woocomerce 1

Chuyển giá sản phẩm về nằm trên nút Add to cart với website WordPress và WooComerce

23/09/2021
1.5k

Trending.

cach tao doi quoc gia cho tai khoan google 4082

Cách tạo (đổi quốc gia) cho tài khoản Google

24/01/2024
18k
cach tao doi quoc gia cho tai khoan google 4082

Cách xóa hồ sơ thanh toán tài khoản Google

24/01/2024
4.5k
57acc582dde37df0a76107d2fb2448d8

Cách Ngắt Link Ảnh Trong Adobe Illustrator, Đơn Giản, Hiệu Quả

04/10/2022
15.1k
huong dan cai dat laragon moi truong phat trien website de dang va nhanh chong tren windows 4053 2

Hướng dẫn cài đặt Laragon – Môi trường phát triển website dễ dàng và nhanh chóng trên Windows

07/12/2023
5.5k
cach sua loi co ve nhu ban o quoc gia khac voi nguoi quan ly gia dinh google 4097 3

Cách sửa lỗi Có vẻ như bạn ở quốc gia khác với người quản lý gia đình Google

24/01/2024
2.3k
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

  • aaPanel
  • Góc ICT
  • Thiết Kế Đồ Hoạ
  • SEO
  • Hướng dẫn WHMCS
  • Hướng dẫn Hosting
  • Hướng dẫn WordPress
  • Email Zimbra
  • Hướng dẫn DirectAdmin
  • Hướng dẫn Hosting cPanel
  • 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 © 2021 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

Add New Playlist

×
    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 © 2021 Hướng dẫn Minh Duy Solutions