Linux 常见命令指南

查看当前目录:pwd

查看服务器版本:uname -m


查看端口进程: ps aux | grep Cloudscape

杀死端口进程: kill -9 端口

 查看日志:tail -100f nohup.log

查看端口进程: netstat -tunlp|grep 端口

查看进程id: ps -ef|grep  进程号

 停用9090端口应用:systemctl disable cockpit

 查看cpu: lscpu

 查看内存大小:free -h

 查看磁盘空间大小:df -h
查看目录空间大小:du -sh *

正确的修改CentOS7 时区的姿势:  ln -sf /usr/share/zoneinfo/Asia/Shanghai    /etc/localtime

查看数据库最新一次启动时间:who -b

 清空大文件:cat /dev/null > access.log

清空大文件:echo -n > ./nohup.out

查看大文件日志:head -n 10 nohup.out

 

linux 退出telent:使用Ctrl + ]键:按下Ctrl和]键同时,在命令提示符下会出现”telnet>”,然后输入”quit”或”exit”命令即可

迁移服务器文件到另外一个服务器 :scp -P 55555 /root/install.* root@172.21.44.16:/usr/local/src

posted @ 2021-12-30 15:41  不再犯错  阅读(42)  评论(0)    收藏  举报