#!/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
#! /usr/bin/python
#! -*- coding:utf-8 -*-
import os
def SplitFile(cnt):
path='e:\data'
filename=path+'\\qunti_deal.txt'
os.chdir(path)
i=0
n=0
size=os.path.getsize(filename)/1024/cnt
pr...
分类:
其他好文 时间:
2014-05-22 09:07:43
阅读次数:
184
1.统计/usr/bin目录下的文件个数[root@localhost~]#ls/usr/bin|wc-l
1306
[root@localhost~]#2.取出当前系统上所有用户的SHELL,要求,每种SHELL只显示一次,并且按顺序进行显示[root@localhost~]#cut-d:-f7/etc/passwd|sort-u
/bin/bash
/bin/nologin
/bin/sync
/bin/tcsh
/sb..
分类:
系统相关 时间:
2014-05-21 02:01:09
阅读次数:
530
安装好mysql数据库后,直接在安装的目录下/usr/local/mysql下新建了一个目录data用于存放数据,建好后,直接去启动数据库,发现启动不了,出现如下报错:mysqld_safeStartingmysqlddaemonwithdatabasesfrom/usr/local/mysql/data/usr/local/mysql/libexec/mysqld:File‘./mysql-..
分类:
数据库 时间:
2014-05-21 01:32:42
阅读次数:
378
nagios工作正常,各个监控页面也可以正常显示,唯独maps无法显示,提示TherequestedURL/nagios/cgi-bin/statusmap.cgiwasnotfoundonthisserver。进到/nagios/cgi-bin/文件夹中发现果然没有statusmap.cgi。上网查了一下,说是可能缺下面的安装包,gdgd-devellibpnglibpng-devell..
分类:
移动开发 时间:
2014-05-21 01:05:34
阅读次数:
393
nagios监控设置monitor告警的用户名和密码默认在commands.cfg文件中定义:其中参数解释:Vimcommands.cfg文件:/usr/local/bin/sendEmail–fnagios@test.com–tyahoon@test.com–smail.test.com–u“fromnagios”–xunagios–xpp#3isoda–mhappy解释:-f表示发送者的邮箱-t表示?.
分类:
移动开发 时间:
2014-05-21 00:36:54
阅读次数:
333
因为用的hadoop2.20所以下载sqoop-1.99.3-bin-hadoop200使用随便找一个hadoopnode节点做sqoopserver:1.下载安装[hadoop@slave1~]$wgethttp://mirror.bit.edu.cn/apache/sqoop/1.99.3/sqoop-1.99.3-bin-hadoop200.tar.gz[hadoop@slave1~]$tarxvfsqoop-1.99.3-bin-hadoop200.tar...
分类:
其他好文 时间:
2014-05-21 00:01:45
阅读次数:
439
1.下载bison,地址见上篇文件,我用的是2.4.1-setup.exe
2.下载flex,地址见上篇文件,我用的是flex-2.5.4a-1.exe
3.下载python,我用的是2.7版本
4.将前面三个软件安装后,将其安装后目录下的bin都添加到系统给的path路径中,将python的根目录增加到系统的path目录
5.使用vs2012打开doxgen的源代码,目录下有个winbu...
分类:
其他好文 时间:
2014-05-20 14:18:58
阅读次数:
319