原创 方法

<IFRAME id=baiduframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src="http://unstat.baidu.com/bdun.bsc?tn=haof

原创 Python 文件目錄操作

Python 文件目錄操作os和os.path模塊 os.listdir(dirname):列出dirname下的目錄和文件 os.getcwd():獲得當前工作目錄 os.curdir:返回但前目錄('.') os.chdir(d

原创 我的友情鏈接

51CTO博客開發

原创 scp 自動輸入密碼

#!/bin/bashexpect -c "set timeout 1200; spawn /usr/bin/scp -r 192.168.142.128:/shell/backup.tar.gz /shellexpect {\"*yes/

原创 Python 處理字符串內置函數詳解

str = 'hello world' 1. 字符串長度獲取            len(str)  2. 字母大小寫轉化                             全部爲大寫:str.upper()      全

原创 我的友情鏈接

51CTO博客開發

原创 Python 文件目錄操作

Python 文件目錄操作os和os.path模塊 os.listdir(dirname):列出dirname下的目錄和文件 os.getcwd():獲得當前工作目錄 os.curdir:返回但前目錄('.') os.chdir(d

原创 Linux下用iptunnel實現***通信

Linux下用iptunnel實現***通信環境:host A: 外網IP: 122.42.42.10虛擬網卡:10.0.0.1host B: 外網IP: 122.42.36.10虛擬網卡:10.0.8.1hostA配置:/sbin/mod

原创 python獲取時間問題

import  time#定義:timedate爲時間戳 def  formattime(timedate,s="%Y-%m-%d %H:%M:%S"):       return  time.strftime(s,time.gmtim

原创 nagios監控初級配置。

 #===========================安裝 Nagios    ======================================== groupadd nagios groupadd nagios us

原创 shell 數據庫批量更新腳本

#!/bin/shUSER_NAME=數據庫用戶名PASS_WORD=數據庫用戶密碼MYSQL_EXEC=mysql目錄function update_db(){    host=$1    db=$2    echo $host $db 

原创 任意三個數按大小排序的算法

#include<stdio.h>main(){        int a,b,c,x;        scanf("%d",&a);        scanf("%d",&b);        scanf("%d",&c);       

原创 java獲取隨機數的兩個方法

方法一:        代碼:import java.util.Random;public class test{    public static void main(String args[]){        Random aa=ne

原创 python操作端口

#!/usr/bin/python import telnetlib host = '???'port = '???'t = telnetlib.Telnet(host,port)t.read_until('')t.write('flush

原创 方法

<IFRAME id=baiduframe border=0 marginWidth=0 frameSpacing=0 marginHeight=0 src="http://unstat.baidu.com/bdun.bsc?tn=haof