原创 Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update!
在web界面開啓服務狀態報警,提示:Error: Could not open command file '/usr/local/nagios/var/rw/nagios.cmd' for update! The permissions
原创 vi批量添加註釋
1、ctrl+v使用方向鍵上下選擇範圍;2、shift+i進入編輯模式,添加“#”。隨後按esc退出(也可理解爲運行批量添加);此時批註已加好3、刪批註:ctrl+v使用方向鍵上下選擇去除批註的範圍,按“x”;有用的東西大家分享
原创 inotify+rsync
Inotify 是爲替代 dnotify 而設計的,它克服了 dnotify 的缺陷,提供了更好用的,簡潔而強大的文件變化通知機制:1. Inotify 不需要對被監視的目標打開文件描述符,而且如果被監視目標在可移動介質上,那麼在 umou
原创 docker1
docker: 鏡像 不可修改 容器 倉庫centos 6.x 先安裝epel 安裝docker-io 啓動服務 docker search centos 尋找docker源docker pull centosdocker im
原创 compgen
compgen: An Awesome Command To List All Linux CommandsPosted on July 19, 2012in Categories Command Line Hacks last updat
原创 complete
In Linux, while typing a command if you press TAB twice, it would list all available commands that starts with typed cha
原创 docker1
docker: 鏡像 不可修改容器倉庫centos 6.x先安裝epel 安裝docker-io 啓動服務 docker search centos 尋找docker源docker pull centosdocker images 查
原创 oracle11g安裝
http://blog.csdn.net/zxnlmj/article/details/22826149
原创 vim編程插件
vim用法vim用法建議使用vim7.0以上版本設置tab的行爲通用設置" Set 4 spaces per tabset expandtabset tabstop=4set softtabstop=4set shiftwidth=4自動檢
原创 python 元類
(一) python中的類今天看到一篇好文,然後結合自己的情況總結一波。這裏討論的python類,都基於python2.7x以及繼承於object的新式類進行討論。首先在python中,所有東西都是對象。這句話非常重要要理解元類我要重新來理
原创 io相關
Increase disk queue depth on LinuxThe default value of the disk queue_depth and nr_requests can be changed for better di
原创 Suse linux查看可用時鐘源和當前時鐘源
:~/Desktop>cat /sys/devices/system/clocksource/clocksource0/available_clocksource tsc hpet acpi_pm:~/Desktop>cat /sys/de
原创 journalctl
http://www.jinbuguo.com/systemd/journalctl.html
原创 mysql分庫備份 shell腳本 --自創 待優化
#/bin/bash####其實可以先判斷目錄存在麼,可寫麼 [ -d .. ] [ -w .. ]DATABASES=`mysql -usystem -p'oldboy123' -e "show databases"|grep -v "D
原创 shell腳本中變量子串的常用操作
字符串操作 ${#string}輸出字句的字符個數 ${string:position:length}輸出$position開始的length長度的字符 ${string:position}[root@ilove scri