[root@qycaishenye]#tail-f/data/caishenye/sa_9_0.logPHPWarning:mkdir():Nosuchfileordirectoryin/data/caishenye/sa_9_0.phponline18PHPFatalerror:Calltoundefinedfunctionmysql_pconnect()in/data/caishenye/sa_9_0.phponline25InteractivemodeenabledPHPWarning:mkdir():..
分类:
数据库 时间:
2014-05-27 04:00:48
阅读次数:
466
1.创建一个用户mandriva,其ID号为2002,基本组为distro(组ID为3003),附加组为linux[root@localhost~]#groupadd-g3003distro
[root@localhost~]#tail-1/etc/group
distro:x:3003:
[root@localhost~]#groupaddlinux
[root@localhost~]#tail-1/etc/group
linux:x:3004:[root@loca..
分类:
系统相关 时间:
2014-05-27 03:37:39
阅读次数:
409
1. scoket函数中PF_INET
AF_INET区别在UNIX系列中,PF_INET表示poxis, BSD系列用AF_INET2. in_addr_t inet_addr(const char
*cp);入参是字符型ip,in_addr_t 为uint32_t3. if (setsockop...
分类:
系统相关 时间:
2014-05-24 00:20:02
阅读次数:
401
1.1程序被其他程序翻译成不同的格式 1.hello.c#include int main(){
printf("hello world\n"); } 2.编译过程 3.编译系统 预处理器、编译器、汇编器和链接器一起构成了编译系统
预处理阶段。预处理器(cp...
分类:
其他好文 时间:
2014-05-23 10:30:50
阅读次数:
297
grep -2 -iIr "err\|warn\|fail\|crit" /var/log/*
查找日志中的所有问题grep . filename >filename1 移除空行cat site.log | grep -i unica | tail
-n 10find /path -name \*....
分类:
其他好文 时间:
2014-05-22 03:42:01
阅读次数:
306
chown递归更新文件所有者chown -cR --from=olduser:oldgroup
newuser:newgroup *chmod 777 *sudo chmod 775 * -Rchgrp root *sudo cp
/usr/share/zoneinfo/Europe/Paris /...
分类:
其他好文 时间:
2014-05-22 02:56:20
阅读次数:
205
DHCP服务器:1、解析ip2、给客户端分配ip安装好dhcp软件包:刚装好dhcp服务软件包,系统默认是启动不起来的。3,dhcp服务的配置文件是没有的,需要cp模板:4、dhcp服务的配置文件几乎多数都为注释,有效行就这么几行:ddns-update-style
interim; /*dhcp支...
分类:
其他好文 时间:
2014-05-18 19:21:42
阅读次数:
392
取的文件大小1.int fd = open("data.txt",O_RDONLY); int
len = lseek(fd,0,SEEK_END);2.structstatsb; if ((fstat(fd, &sb)) == -1) {
perror("fstat"); }sb.st_size3...
分类:
编程语言 时间:
2014-05-17 21:24:29
阅读次数:
267
开始在这里记录在jd的点滴成长~~~3月20日入职,距离今天两个月还差5天,不过这段时间完成的东西还真不少,学习了很多的linux命令和Axure产品设计,比如:awk神器、sed、sort、head、tail、find、xargs、grep等等,收获很大~~~其中到今天为止已经完成了一个功能非常强...
分类:
其他好文 时间:
2014-05-16 01:03:10
阅读次数:
314
#!/bin/bash
#function:cutnginxlogfilesshell
#cp/usr/local/nginx/logs/access.log/usr/local/nginx/logs/access.log.bak
log_cut_path="/var/log/nginx"
log_files_path="/usr/local/nginx/logs/"
log_files_dir=${log_cut_path}$(date-d"yesterday"+"%Y")/$(date-d"yesterd..
分类:
其他好文 时间:
2014-05-15 18:49:50
阅读次数:
244