Một số lệnh ssh và Scripts của Cpanel

Article ID: 60
Cập nhật gần nhất: 02 Th03, 2019

Sau đây là một số lệnh command dành cho bạn khi dùng SSH trên nền linux và  Control là Cpanel

rm -rf ( file_name ) xóa file hoặc foder, bạn có thể xóa nhiều file cùng lúc bằng dấu cách, ví dụ : rm -rffile1 file2 file3

rm -rf * ( xóa toàn bộ file trong thư mục bạn đang đứng ) bạn có thể kết hợp lệnh này để xóa một định dạng file theo ý muốn, ví dụ : rm -rf *.txt lệnh này sẽ xóa toàn bộ file có đuôi .txt

ls -la ( hiển thị danh mục file và foder bạn đang đứng )

ls -alh ( hiển thị file chi tiết dung lượng )

ls -alhS | more ( hiển thị file dung lượng theo thứ tự từ lớn đến nhỏ )

ls -alh | grep file_name hoặc foder  ( tìm kiếm chi tiết một  file hoặc foder theo ý muốn )

cat file_name ( hiển thị nội dung file)

nano file_name ( chỉnh sửa nội dung một file bất kỳ )

Nén và giải nén file

tar zcvf  ( file_name.tar.gz  file_name hoặc foder ) lệnh tar này sẽ nén dữ liệu file hoặc foder khi bạn tar lại

tar cvf ( file_name.tar.gz  file_name hoặc foder ) lệnh này sẽ tar mà không có nén file hoặc foder ( bạn có thể dùng lệnh này để tránh làm CPU Server hay VPS của bạn load cao khi Server hoặc VPS cấu hình yếu hoặc đang load cao )

 tar zxvf ( file_name.tar.gz ) giải nén file tar

Các lệnh Scripts của Cpanel

/scripts/adddns Add a Dns Entry
/scripts/addfpmail Install Frontpage Mail Exts
/scripts/addservlets Add JavaServlets to an account (jsp plugin required)
/scripts/adduser Add a User
/scripts/admin Run WHM Lite
/scripts/apachelimits Add Rlimits (cpu and mem limits) to apache
/scripts/dnstransfer Resync with a master DNS Server
/scripts/editquota Edit A User’s Quota
/scripts/finddev Search For Trojans in /dev
/scripts/findtrojans Locate Trojan Horses
/scripts/findtrojans < /var/log/trojans
/scripts/fixtrojans < /var/log/trojans
/scripts/fixcartwithsuexec Make Interchange work with suexec
/scripts/fixinterchange Fix Most Problems with Interchange
/scripts/fixtrojans Run on a trojans horse file created by findtrojans to remove them
/scripts/fixwebalizer Run this if a user’s stats stop working
/scripts/fixvaliases Fix a broken valias file
/scripts/hdparamify Turn on DMA and 32bit IDE hard drive access (once per boot)
/scripts/initquotas Re-scan quotas. Usually fixes Disk space display problems
/scripts/initsuexec Turn on SUEXEC (probably a bad idea)
/scripts/installzendopt Fetch + Install Zend Optimizer
/scripts/ipusage Display Ipusage Report
/scripts/killacct Terminate an Account
/scripts/killbadrpms Delete \”Security Problem Infested RPMS\”
/scripts/mailperm Fix Various Mail Permission Problems
/scripts/mailtroubleshoot Attempt to Troubleshoot a Mail Problem
/scripts/mysqlpasswd Change a Mysql Password
/scripts/quicksecure Kill Potential Security Problem Services
/scripts/rebuildippool Rebuild Ip Address Pool
/scripts/remdefssl Delete Nasty SSL entry in apache default httpd.conf
/scripts/restartsrv Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)
/scripts/rpmup Syncup Security Updates from RedHat/Mandrake
/scripts/runlogsnow Force a webalizer/analog update
/scripts/secureit Remove non-important suid binaries
/scripts/setupfp4 Install Frontpage 4+ on an account
/scripts/simpleps Return a Simple process list. Useful for finding where cgi scripts are running from
/scripts/suspendacct Suspend an account
/scripts/sysup Syncup Cpanel RPM Updates
/scripts/ulimitnamed RH 6 only. Install a version of bind to handle many many zones
/scripts/unblockip Unblock an IP
/scripts/unsuspendacct UnSuspend an account
/scripts/upcp Update Cpanel
/scripts/updatenow Update /scripts
/scripts/wwwacct Create a New Account

Article ID: 60
Cập nhật gần nhất: 02 Th03, 2019
Lần sửa đổi: 1
Lượt xem: 2116