TungNT (Blue)

tungnt.blue@gmail.com

User Tools

Site Tools


development:system:mac-os

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
development:system:mac-os [2024/08/06 09:22] – [6.1. Restart shell] tungntdevelopment:system:mac-os [2025/03/12 02:37] (current) – [6.1. Restart shell] tungnt
Line 236: Line 236:
 Scan for additional .ini files in: /opt/homebrew/etc/php/8.2/conf.d Scan for additional .ini files in: /opt/homebrew/etc/php/8.2/conf.d
 Additional .ini files parsed:      /opt/homebrew/etc/php/8.2/conf.d/ext-opcache.ini     Additional .ini files parsed:      /opt/homebrew/etc/php/8.2/conf.d/ext-opcache.ini    
 +
 +...
 +/opt/homebrew/Cellar/php/8.2.6/pecl/20220829
 </code> </code>
 ===== 3.6. Xoá cài đặt PHP ===== ===== 3.6. Xoá cài đặt PHP =====
Line 315: Line 318:
 </code> </code>
  
 +====== Supervisor ======
 +
 +<code>
 +brew install supervisor
 +
 +supervisord --version
 +</code>
 +
 +  * /opt/homebrew/etc/supervisor.d
 +  * /opt/homebrew/etc/supervisord.conf
 +  * /opt/homebrew/var/log/supervisord.log
  
 ====== 6. Một số lênh khác ====== ====== 6. Một số lênh khác ======
Line 325: Line 339:
 % sudo find / -name my.cnf # Tìm file thư mục % sudo find / -name my.cnf # Tìm file thư mục
 </code> </code>
 +
 +==== 7. Dọn dẹp hệ thống ====
 +
 +==== 7.1. Xoá cache/log ====
 +
 +Mở Finder → Nhấn Cmd + Shift + G → Nhập đường dẫn:
 +
 +  * ~/Library/Caches
 +  * /Library/Caches
 +  * ~/Library/Logs
 +
 +Xóa tất cả các thư mục bên trong (không xóa toàn bộ thư mục Caches)
 +
 +Hoặc:
 +
 +<code bash>
 +rm -rf ~/Library/Caches/*
 +rm -rf /Library/Caches/*
 +rm -rf ~/Library/Logs/*
 +</code>
 +
 +==== 7.2. Gỡ ứng dụng không dùng đến ====
 +
 +Vào Applications (Cmd + Shift + A trong Finder). Kéo ứng dụng vào Trash. Xóa các file còn sót lại trong:
 +
 +  * ~/Library/Application Support/
 +  * ~/Library/Preferences/
 +
 +==== 7.3. Dọn dẹp bộ nhớ hệ thống bằng Terminal ====
 +
 +<code>
 +sudo purge
 +</code>
 +
 +==== 7.4. Kiểm tra dung lượng & xóa file lớn ====
 +
 +Mở Finder → Cmd + F → Chọn File Size > Lớn hơn 100MB để xem file nào chiếm nhiều dung lượng.
 +
 +Hoặc:
 +
 +<code>
 +du -sh * | sort -hr | head -20
 +</code>
 +
 +==== 7.5. Xóa file tải xuống không cần thiết ====
 +
 +Mở Finder → Cmd + Shift + G → nhập: ~/Downloads
 +
 +==== 7.6. Xóa ứng dụng chạy nền không cần thiết ====
 +
 +Vào System Settings → General → Login Items. Tắt ứng dụng không cần thiết.
 +
 +Hoặc dùng Terminal:
 +
 +<code>
 +launchctl list
 +</code>
 +
 +Nếu thấy ứng dụng không cần thiết:
 +
 +<code>
 +launchctl remove <tên_dịch_vụ>
 +</code>
 +
 +==== 7.7. Tắt file snapshot của Time Machine (Nếu có) ====
 +
 +Nếu dùng Time Machine, macOS có thể giữ các snapshot cũ. Xóa bằng:
 +
 +<code>
 +tmutil listlocalsnapshots /
 +
 +tmutil deletelocalsnapshots YYYY-MM-DD-HHMMSS # xóa từng cái 
 +</code>
 +
 +==== 7.8. Kiểm tra dung lượng ổ đĩa nhanh ====
 +
 +Apple Menu → About This Mac → Storage.
 +
 +Hoặc:
 +
 +<code>
 +df -h
 +</code>
 +
 +
development/system/mac-os.1722936150.txt.gz · Last modified: 2024/08/06 09:22 by tungnt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki