获得计算机cpu的个数:cat /proc/cpuinfo | grep processor | wc -l
分类:
其他好文 时间:
2014-07-24 22:22:12
阅读次数:
209
1.命令格式:at[参数][时间]2.命令功能:在一个指定的时间执行一个指定任务,只能执行一次,且需要开启atd进程(ps -ef | grep atd查看, 开启用/etc/init.d/atd start or restart; 开机即启动则需要运行 chkconfig --level 2345...
分类:
系统相关 时间:
2014-07-24 22:03:32
阅读次数:
333
1.清理前内存使用情况free -m2.开始清理echo 1 > /proc/sys/vm/drop_caches3.清理后内存使用情况free -m4.完成!查看内存条数命令:dmidecode|grep-A16"MemoryDevice$"++++++++++++++++++++++++++++...
分类:
系统相关 时间:
2014-07-24 21:23:26
阅读次数:
276
文本查找查找命令的grep、egrep、fgrep用法的详解一、学习目标了解并能熟悉运用grep、egrep、fgrep命令。二、学习内容1、grep、egrep、fgrep命令的意思和用法格式:grep:是使用基本正则表达式定义的模式来过滤文本的命令。#grep[options]PATTERN[FILE,...]egrep:是使用扩展正..
分类:
其他好文 时间:
2014-07-24 18:03:37
阅读次数:
264
1.因为Ubuntu比较乱,需要寻找DirectoryIndex存放在哪个配置文档中grep -iR DirectoryIndex /etc/apache2我这里提示三个路径存放,第三个为phpmyadmin,无关,进入前两个(任意一个皆可,改完其中一个另外一个自动更改)2.sudo vim /et...
分类:
其他好文 时间:
2014-07-24 17:04:45
阅读次数:
211
直接修改locales.inc.php中中文可视调整为True即可:[root@Zabbix-CentOS-35~]#cat/data/zabbix/include/locales.inc.php|grep-n"‘display‘"50:‘en_GB‘=>array(‘name‘=>_(‘English(en_GB)‘),‘display‘=>true),51:‘en_US‘=>array(‘name‘=>_(‘English(en_US)‘),‘di..
分类:
其他好文 时间:
2014-07-24 14:50:56
阅读次数:
296
一下是重启Linux下某进程的shell脚本,以tomcat进程为例:
#!/bin/sh
pid=`ps -ef|grep tomcat|grep -v grep|awk '{print $2}'`
if [ "$pid" = "" ] ; then
echo "tomcat service does not start!"
else
kill -9 $pid
pi...
分类:
系统相关 时间:
2014-07-24 10:28:03
阅读次数:
251
下面,就给大家介绍这些CentOS常用命令。一:使用CentOS常用命令查看cpumore /proc/cpuinfo | grep "model name"grep "model name" /proc/cpuinfo[root@localhost /]# grep "CPU" /proc/cpu...
分类:
其他好文 时间:
2014-07-24 10:18:44
阅读次数:
399
举例:grep -a -n -B 10 -C 10 --color=auto xxx文件 含义: -a 将 二进制文件以 text 文件的方式搜寻数据? -n 显示行号 ? ?--color=auto 来将关键字部分使用颜色显示 -B 10 关键字前面再显示10行? ?-C 10 关...
分类:
其他好文 时间:
2014-07-23 17:37:01
阅读次数:
196
[enilu@enilu ~]$ mplayerbash: mplayer: command not found[enilu@enilu ~]$ yum list | grep mplayer^C^CExiting on Broken Pipe[enilu@enilu ~]$ [enilu@en.....
分类:
系统相关 时间:
2014-07-23 11:33:56
阅读次数:
490