http://wangwei007.blog.51cto.com/68019/1106735检查Linux系统日志error和mysql错误日志的脚本http://wangwei007.blog.51cto.com/68019/1102836picklehttp://wangwei007.blog.51cto.com/68019/1045577python用zipfile模块打包文件或是目录、解压zip文件实例http://blog.163.co..
分类:
编程语言 时间:
2014-05-27 04:14:22
阅读次数:
434
#!/bin/bash
process=8
PWD=`pwd`
DAT=`date`
ftpip="192.168.1.1"
user="ftp_username"
password="ftp_password"
local_dir="/home/"
getlist()
{
ftp-n$ftpip<<EOF|awk‘{print$9}‘|sed‘/^$/d‘>$PWD/list
user$user$password
cdfile/
dir
bye
EOF
}
copy()
{
if[-f$P..
分类:
系统相关 时间:
2014-05-27 03:55:34
阅读次数:
378
#!/usr/bin/python
#-*-coding:utf-8-*-
importparamiko,os,datetime
server_ip=‘192.168.1.123‘
server_user=‘root‘
server_passwd=‘10241010‘
server_port=22
#local_dir=‘C:\Python27‘
#remote_dir=‘/soft2/nba/‘
defssh_connect():
ssh=paramiko.SSHClient()
ssh.set_missi..
分类:
编程语言 时间:
2014-05-27 03:51:40
阅读次数:
283
编写一个shell脚本,实现加法和乘法运算。#!/bin/bash#Function:num1+num2num3*num4sum(){read-p"pleasekeyinfirstnumber:"num1read-p"pleasekeyinsecondnumber:"num2letnum3=${num1}+${num2}echo-e"\033[32m$num1+$num2=$num3\033[0m"}#############cf(){read-p"pleasekeyinfi..
分类:
其他好文 时间:
2014-05-27 03:28:19
阅读次数:
219
linux下实现多线程有两种函数调用:一种是通过pthread.h里面已经封装好的函数调用,另一种是通过unistd.h里面的fork函数调用。前面已经已经列举了pthread的使用,下面来书fork的例子。
一.fork函数
简单的fork例子
#include
#include
#include
using namespace std;
int main()
{...
分类:
编程语言 时间:
2014-05-23 07:59:41
阅读次数:
395
libsvm的函数调用方法 详解
本文地址: http://blog.csdn.net/caroline_wendy/article/details/26261173
需要加载(load)SVM的模型, 然后将结点转换为SVM的格式, 即索引(index)+数据(value)的形式;
释放SVM的model有专用的函数: svm_free_and_destroy_model, 否则容易内存泄露;
可以预测数据的概率, 则需...
分类:
其他好文 时间:
2014-05-22 10:52:57
阅读次数:
335
linux shell 命令
什么是Shell?
Shell 是连接操作系统内核 与 用户 的接口。
终端是shell的表现形式。
什么是Shell编程?
Shell 脚本语言加上linux 命令语句就构成了shell程序。优点在于批量处理、不用用户每次手动输入。
bash是shell程序解释器的一种。
常用命令
pwd:print working directory,打印工...
分类:
系统相关 时间:
2014-05-22 10:39:17
阅读次数:
442
[ awk简介: ]
awk可以从一个文本中获取部分内容, 或者对这个文本进行排版, 使它按某种格式输出.
[ awk工作流程: ]
awk会把文件一行内容去到...
分类:
系统相关 时间:
2014-05-22 08:06:46
阅读次数:
395
return 和 exit 的区别
exit() 表示结束当前进程或当前程序,在整个程序中,只要有
exit,就退出,并将应用程序的一个状态返回给OS。一般
和操作系统相关的是0为正常退出,非0为非正常退出。
return: 表示调用堆栈的返回。例如当程序进入函数调用时,当函数
...
分类:
其他好文 时间:
2014-05-22 06:22:02
阅读次数:
258
DataStage通过分析日志获取Job插入目标表的记录数这只是一种不太好的方法,也许还有更好、更简便的方法。这种方法要求每次运行Job之前删除已有的日志信息,否则无法统计出正确的记录数。当然,在Job跑完之后,可以在shell备份本次Job运行的日志到服务器磁盘。1日志清理设置登录..
分类:
其他好文 时间:
2014-05-20 18:21:01
阅读次数:
422