原创 mysql排除多表記錄

#!/bin/bash database="test" dbuser="root" dbpasswd="abcdef" options="" #定義排除表的數組 ignoreTableArray=(wk_ap_info wk_ap_pwd

原创 windows環境中安裝pip

windows下安裝PIP當前環境(windows 7,python安裝路徑爲c:\Python)1.首先到官網下載(https://pypi.python.org/pypi/setuptools#downloads)下載文件地址:http

原创 日誌切割|程序數據庫備份

日誌切割#!/bin/bash #cut nginx logs nginx_sbin="/usr/local/openresty/nginx/sbin/nginx" log_files_path="/usr/local/openresty/

原创 Python遍歷文件和內容

#!/usr/bin/python #-*- coding: utf-8 -*- #圖片中有大量冗餘數據,需要刪除,現在有開發跑出有用的圖片,並且按照每天生產.txt 文件 #1.遍歷按天生產.txt文件,新建一個新的目錄,將有用文件都移動

原创 python 獲取時間

1.python獲取當前日期①方法1 #!/usr/bin/python # -*- coding: utf-8 -*- import time today=time.strftime('%Y-%m-%d',time.localtime(t

原创 nginx日誌切割

#!/bin/bash #cut nginx logs nginx_sbin="/workspace/ngx_openresty/nginx/sbin/nginx" log_files_path="/workspace/ngx_openre

原创 shell遍歷數組

#!/bin/bash #filename 1.sh array=(e1 e2 e3) echo ${array[@]} for data in ${array[@]} do          echo ${data} done結果:[r

原创 一句話shell命令

1、清空以log文件結尾的文件內容 find . -type f -name "*.log" -exec cp /dev/null {} \;

原创 python統計獨立IP

####python統計獨立IP#####!/usr/bin/python #coding:utf8 import re import sys import time yesterday=time.strftime('%Y%m%d',tim

原创 我的友情鏈接

51CTO博客開發

原创 python簡單分析日誌

問題:通過python 統計uid不同的,並且是"a=RUN"的次數#!/usr/bin/python # -*- coding:utf-8 -*- ##exapmle:統計‘a=RUN’的次數,並且UID不能重複 ##123.234.40

原创 samba服務簡單配置使用

1.檢查是否安裝有samba rpm -qa | grep "samba" 2.如果沒有安裝 yum install samba 3.找到配置文件/etc/samba/smb.conf ①不需要密碼的配置文件 [global] wo

原创 mysql最大連接設置

mysql最大使用連接數:show global status like 'max_used_connections'max_connections設置(參考如下公式):max_used_connections/max_connection

原创 python升級

安裝pythontar zxvf Python-3.3.0.tgzcd Python-3.3.0./configure --prefix=/usr/local/python3makemake installpython升級帶來的yum異常問