1. 先用rpm -qa| grep vsftpd命令检查是否已经安装,如果ftp没有安装,使用yum -y install vsftpd 安装,(ubuntu 下使用apt-get install vsftpd)2. service vsftpd start启动要让FTP每次开机自动启动,运行命令...
分类:
系统相关 时间:
2014-09-26 15:01:18
阅读次数:
230
使用grep-c可以统计每个文件匹配模式的数量,通过这种方法可以抽取出不匹配模式的那些文件,因为不包含匹配模式的文件将显示为file:0vgrep()
{case$#in
0|1)echo"Usage:`basename$0`patternfile[files...]"1>&2
;;
*)pattern=$1
shift
grep-c$pattern"$@"|sed-n‘s/:0$//p‘..
分类:
其他好文 时间:
2014-09-26 12:12:29
阅读次数:
183
先简单介绍下,下一次介绍正则表达式
regular expression(RE) grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。Unix的grep家族包 括grep、egrep和fgrep。egrep和...
分类:
其他好文 时间:
2014-09-26 12:04:28
阅读次数:
129
CentOS常用命令在我们的使用中,经常被使用。所以,我们对一些经常使用又很重要的CentOS常用命令进行了全面的整理。下面,就来介绍这些CentOS常用命令。一:使用CentOS常用命令查看cpu more /proc/cpuinfo | grep "model name" gre...
分类:
其他好文 时间:
2014-09-26 10:03:48
阅读次数:
209
打造阅读Linux源代码利器在Linux里阅读/编写代码一般用vi但是碰到较大的项目时阅读源代码还是比较费力,一直用find和grep命令。其实,我们自己可以打造一个阅读源代码的vim,这样大大提高工作效率。阅读源码利器组合:Vi + Ctags + taglist以下为最终实现的效果图: 安装Ct...
分类:
系统相关 时间:
2014-09-25 23:22:27
阅读次数:
352
#rpm -qa |grep ssh 检查是否装了SSH包 没有的话yum install openssh-server #chkconfig --list sshd 检查SSHD是否在本运行级别下设置为开机启动 #chkconfig --level 2345 sshd on??如果没设置启动就设置下. #...
分类:
系统相关 时间:
2014-09-25 20:29:57
阅读次数:
262
我的主要工作就是api的编写,那么如何测试API响应时间,以及预计高并发服务器压力呢?1 首先统计API每日访问总数,举例为a。 API一般有访问日志,统计访问日志。linux下 用到类似grep wc管道命令统计。2 计算并发数。 这个怎么计算呢?预估一下。这里我们有这么一个原则:80%流量...
今天解决某单位前几天因/var文件系统写满后,syslog停止工作。 #cat /var/adm/syslog/syslog.log
发现日志停止在19日就没记录了,进程却还在
#ps -fe|grep syslog root 14208 1 0 10:57:04 ? 0:00 /usr/sbin/...
分类:
其他好文 时间:
2014-09-25 13:58:29
阅读次数:
219
调试技巧:保存log并同时打印屏幕打印log命令adb logcat -v threadtime只能输出到屏幕 如果同时想输出屏幕并保存log回看,可以用"tee"做管道输出:adb logcat -v threadtime | tee backup.log | grep 'MediaPlayerS...
分类:
数据库 时间:
2014-09-25 12:41:38
阅读次数:
482
man grep
grep searches the named input FILEs (or standard input if no files are named, or if a single hyphen-minus (-) is given as file name) for lines containing a match to the given PATT...
分类:
其他好文 时间:
2014-09-25 12:05:58
阅读次数:
195