随笔分类 - Linux系统
摘要:# shell脚本实现死循环方法一:while :do somethingdone方法二:while [1]方法三:while true方法四:while ((1))方法五:while [[1]]方法六:while ["1"=="1"]方法七:while test "1"=="1" ########
阅读全文
摘要:tshark -i WORK -w vcu.pcap -b filesize:10 tcp port 3389filesize单位KBtshark -i WORK -w E:\ftp.pcap -b filesize:204800 -f "not port 3389 and tcp and ip h
阅读全文
摘要:(1)ls -il获取节点的索引信息[root@localhost home]# ls -il总用量 0 3508078 drwxr-xr-x. 5 root root 137 11月 12 09:03 tmp4307597450 -rwsrwsrwt. 1 root root 0 1月 1 197
阅读全文
摘要:ls带详细时间ls -l --time-style='+%y-%m-%d %H:%M:%S'ls --full-time精确到ns
阅读全文
摘要:(1)默认升序排列ps -auxw --sort %cpups -auxw --sort rss(2)降序排列ps -auxw --sort -%cpups -auxw --sort -rssps -auxw --sort -rss|head -5 //仅显示TOP5
阅读全文
摘要:以下为查看、设置cpu动态工作频率的命令:查看cpu0的当前工作频率:cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 查看cpu0的最大工作频率:cat /sys/devices/system/cpu/cpu0/cpufreq/cp
阅读全文
摘要:[anaconda root@localhost ~]# whoroot ttyS0 Mar 26 09:19root pts/0 Mar 26 09:21 (10.0.31.80)root pts/1 Mar 26 10:45 (10.0.31.40)root pts/2 Mar 26 11:09
阅读全文
摘要:获取TCP各状态数量netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' ESTABLISHED 115TIME_WAIT 36
阅读全文
摘要:1、firewalld的基本使用 启动: systemctl start firewalld查看状态: systemctl status firewalld 停止: systemctl disable firewalld禁用: systemctl stop firewalld 2、systemctl
阅读全文
摘要:1、CentOS系列 1)yum install lm_sensors;2)sensors-detect3)sensors 2、Ubuntu系列 1)apt-get install lm-sensors2)sensors-detect3)service kmod start4)sensors 注意:
阅读全文
摘要:(1)方法1:localtime[root@localhost ~]# ll /etc/localtime lrwxrwxrwx. 1 root root 35 9月 3 2018 /etc/localtime -> ../usr/share/zoneinfo/Asia/Shanghai 注:由于是
阅读全文