码迷,mamicode.com
首页 >  
搜索关键字:usr    ( 26217个结果
apache log 按日期记录 格式 <GOOD>-- (转)
在apache的配置文件中找到ErrorLoglogs/error_logCustomLoglogs/access_log commonLinux系统配置方法:将其改为ErrorLog “| /usr/local/apache/bin/rotatelogs /home/logs/www/%Y_%m_...
分类:其他好文   时间:2014-07-03 07:06:29    阅读次数:281
linux 下 /bin /sbin 的区别 -- (转)
/bin,/sbin,/usr/bin,/usr/sbin区别/ : this is root directory root 用户根目录/bin : commands in this dir are all system installed user commands 系统的一些指令/sbin: c...
分类:系统相关   时间:2014-07-03 06:29:10    阅读次数:223
python通信串口pyserial安装及常用语句
一、安装1.下载软件包pyserial-2.7.tar.gz 网址:https://pypi.python.org/pypi/pyserial2.8uftp上传至/usr/local/src/目录下3.cd/usr/local/src/4.解压tar -zxvf pyserial-2.7.tar.....
分类:编程语言   时间:2014-07-03 06:05:52    阅读次数:1432
SFTP上传下载文件、文件夹常用操作
SFTP上传下载文件、文件夹常用操作1.查看上传下载目录lpwd2.改变上传和下载的目录(例如D盘):lcd d:/ 3.查看当前路径pwd4.下载文件(例如我要将服务器上tomcat的日志文件取出来)进入你要下的文件所在的文件夹:cd /usr/apache-tomcat-6.0.39/logs/...
分类:其他好文   时间:2014-07-03 00:48:26    阅读次数:522
安装 ant
(1)下载ant:http://ant.apache.org/bindownload.cgi(2)解压后放在指定的文件夹中(/usr/lib)(3) sudo chmod 777 /usr/lib/ant1.9.4(4)配置环境变量vi /etc/profilevi /etc/bash.bashrc...
分类:其他好文   时间:2014-07-02 22:33:27    阅读次数:256
长连接和心跳包
第一种设置:通过设置socket的keepalive属性#include "/usr/include/linux/tcp.h"#include "/usr/include/linux/socket.h"////KeepAlive实现,单位秒//下面代码要求有ACE,如果没有包含ACE,则请把用到的A...
分类:其他好文   时间:2014-07-02 22:23:42    阅读次数:711
大文件不断行切割
#! /usr/bin/python#! -*- coding:utf-8 -*-import osdef SplitFile(cnt): path='e:\data' filename=path+'\\qunti_deal.txt' os.chdir(path) i=0 n=0 siz...
分类:其他好文   时间:2014-07-02 21:15:42    阅读次数:228
opennebula 自定义安装目录
/bin/sh /app/xmlrpc-c-1.16.34/mkinstalldirs /usr/local/lib/bin/sh /app/xmlrpc-c-1.16.34/mkinstalldirs /usr/local/include/bin/sh /app/xmlrpc-c-1.16.34/...
分类:其他好文   时间:2014-07-02 21:13:44    阅读次数:186
分析varnish日志
#!/bin/sh#varnish切割日志,每隔一天切割一次/usr/sbin/ntpdate202.112.10.36>>/dev/nulllogpath=/Data/logsif[-f$logpath/varnish.log];thenmv$logpath/varnish.log$logpath/varnish.`date"+%Y-%m-%d"`.logkillall-9varnishncsa/usr/bin/varnishncsa-n/var/lib/varnish..
分类:其他好文   时间:2014-07-02 06:34:33    阅读次数:251
python try小例子
#!/usr/bin/pythonimporttelnetlibimportsockettry:tn=telnetlib.Telnet(‘10.67.21.29‘,60000)exceptsocket.error,e:printeexit(1)tn.set_debuglevel(1)tn.write(‘quit‘+‘\n‘)print‘ok‘socket.error为错误类型e为对象
分类:编程语言   时间:2014-07-01 15:33:07    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!