linux 常用的命令

时间:2021-04-20 15:45:36   收藏:0   阅读:0
cat /etc/passwd | cut -f 1 -d : |xargs -I {} crontab -l -u {}
lsblk
lsblk -f
cat /etc/redhat-release
last -f /var/log/wtmp
ls -l | grep "^d" | wc -l
ls -l | grep "^-" | wc -l
ls -lR| grep "^-" | wc -l
ls -lR | grep "^d" | wc -l
ls -l /proc/$PID/exe 或 file /proc/$PID/exe
ls -l /proc/$PID8/exe 或 file /proc/$PID/exe
ps -ef --sort -pcpu
ps -aux --sort=-pcpu|head -10
more /etc/cron.daily/* 
chkconfig --list | grep "3:启用\|5:启用"
chkconfig --list | grep "3:on\|5:on"
1表示:单用户模式
2表示:无网络连接的多用户命令行模式
3表示:有网络连接的多用户命令行模式
4表示:不可用
5表示:带图形界面的多用户模式
6表示:重新启动
/var/spool/cron/* 
/etc/crontab
/etc/cron.d/*
/etc/cron.daily/* 
/etc/cron.hourly/* 
/etc/cron.monthly/*
/etc/cron.weekly/
/etc/anacrontab
/var/spool/anacron/*
vim /etc/inittab
# Default runlevel. The runlevels used are:

#   0 - halt (Do NOT set initdefault to this)

#   1 - Single user mode

#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)

#   3 - Full multiuser mode

#   4 - unused

#   5 - X11

#   6 - reboot (Do NOT set initdefault to this)

#

id:5:initdefault
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!