菜鸟linux

//查看系统中文件的使用情况
df -h
//查看当前目录下各个文件及目录占用空间大小
du -sh *
//查看当期端口使用情况
netstat -tlpn

//find命令详见--https://www.cnblogs.com/f-ck-need-u/p/10704754.html
$ find /tmp -name "*.log"
find /tmp -path '*a*/*.log'

find /tmp -type f -name "a*.sh"
find /tmp -type d -name "a*"


find /tmp -type f -mtime -3 -name "*.sh"
$ find /tmp -type f -size +100k -name '*.sh'

$ find /test -type f -newermt 2017-06-03 -a ! -newermt 2017-06-06


根据进程id或者名称查找相关信息
ps -ef|grep xxxx
或者
ps aux|grep xxx
  • ps a 显示现行终端机下的所有程序,包括其他用户的程序。
  • ps u   以用户为主的格式来显示程序状况。
  • ps x   显示所有程序,不以终端机来区分。
 
原文地址:https://www.cnblogs.com/breakingbrad/p/10569395.html