本篇出自:遨遊飛翔
- 11月 26 週三 200822:34
[轉貼]利用bandwidthd偵測各ip流量
- 11月 26 週三 200822:30
[轉貼] iftop 即時監看主機連線狀態
本篇出自:遨遊飛翔
- 11月 26 週三 200822:20
[轉貼] 保留30 天內的檔案備份
本文出自:豬窩
之前用 rsync 在每天晚上將幾台主機的資料備份起來,開始怕如果有勿刪檔案的情形,所以不趕用 --delete
參數,刪除來源已經刪除的檔案,可是這樣備份檔會無限擴大,今天終於想到一個很笨的方式,就是用 find 指令刪除超過30天沒有存取的檔案,建一個
rm30.sh ,將它放在 cron.weekly 下就可以了請它每7天做一次 rm30.sh 內容如下:
#!/bin/sh
/usr/bin/find /back -atime +30 -exec rm -f {} \;
之前用 rsync 在每天晚上將幾台主機的資料備份起來,開始怕如果有勿刪檔案的情形,所以不趕用 --delete
參數,刪除來源已經刪除的檔案,可是這樣備份檔會無限擴大,今天終於想到一個很笨的方式,就是用 find 指令刪除超過30天沒有存取的檔案,建一個
rm30.sh ,將它放在 cron.weekly 下就可以了請它每7天做一次 rm30.sh 內容如下:
#!/bin/sh
/usr/bin/find /back -atime +30 -exec rm -f {} \;
- 11月 26 週三 200822:14
[轉貼] 限制 linux 帳號在 postfix 寄信或收信
本文出處:豬窩
- 11月 26 週三 200821:41
[轉貼] PHP產生分頁導覽的 class (純文字分頁導覽列)
本篇原始出處: 一陣風,讓我翱翔天空~~
- 10月 30 週四 200822:06
[轉貼] 使用ssh同時管理多台主機
本文出自:LinuxTOY
dsh 簡單說來就是可以同時通過 ssh 來控制多台機器。
dsh 簡單說來就是可以同時通過 ssh 來控制多台機器。
- 10月 30 週四 200821:41
[轉貼] 將過大的mailbox移到收件匣
本篇全文出自:鳥毅的BLOG
由 於Openwebmail的限制,不能用maildir,只能維持使用mailbox,這是系統loading高的主因。
由於許多原因以及沒有功能更齊全 的webmail前提下,只能暫時如此處理。本來要用比較熟悉的Java寫,
但是搜尋之下並沒有功能完整的library,而Python內建就支援 mailbox處理,
在缺乏其他支援/資源的情況下也只能硬著頭皮寫。因為我比較懶,裡頭有用到一個date parser,使用前請先安裝。
這裡的環境針對FreeBSD + Postfix+Openwebmail,sendmail/qmail應該也適用,我在Ubuntu開發,所以在Linux"應該"也能正常執行。
完整程式如下:
由 於Openwebmail的限制,不能用maildir,只能維持使用mailbox,這是系統loading高的主因。
由於許多原因以及沒有功能更齊全 的webmail前提下,只能暫時如此處理。本來要用比較熟悉的Java寫,
但是搜尋之下並沒有功能完整的library,而Python內建就支援 mailbox處理,
在缺乏其他支援/資源的情況下也只能硬著頭皮寫。因為我比較懶,裡頭有用到一個date parser,使用前請先安裝。
這裡的環境針對FreeBSD + Postfix+Openwebmail,sendmail/qmail應該也適用,我在Ubuntu開發,所以在Linux"應該"也能正常執行。
完整程式如下:
- 10月 30 週四 200811:58
[轉貼]可攜式 APM 網頁伺服器
本篇出自憂藍夢境
這是一個非常實用的工具程式,可以把整個網頁伺服器裝在隨身碟上,隨時帶著走。
對最近剛開始要學習PHP的我來說實在太方便了~
下載點:點我下載
/*************************
* 可攜式 APM 網頁伺服器
*************************/
APM 網頁伺服器即是,Apache + PHP + MySQL 的縮寫,本套件無需經過安裝,解壓縮後即可使用,達到真正可攜帶版的網頁伺服器,對於經常要使用 PHP、MySQL 的開發者非常方便。
使用說明:
將檔案解壓縮,執行 apmxe.exe 即可,網站根目錄為 www
CGI 執行目錄為 cgi-bin,直譯器位置使用 #!perl/perl.exe 即可
結束程式後執行 deltemp.bat 可刪除 log、session 等暫存檔
[ MySQL 預設帳密:root / test ]
※注意:
1. 路徑名稱不可有特殊字元,例如桌面
2. 如果原先有安裝以服務形式啟動的 Apache、MySQL 等套件,請務必移除
* http://localhost/phpMyAdmin => phpMyAdmin 2.11.0
* http://localhost/phpinfo.php => phpinfo 函式,顯示伺服器資訊
* http://localhost/iProber.php => iProber 環境探針
* http://localhost/cgi-bin/cgi-env.cgi => CGI 環境探針
使用者仍可自行修改設定參數,設定檔如下:
* httpd.conf.template => Apache 設定檔
* php.conf.template => Apache PHP module 設定
* php.ini.template => PHP 設定檔
* my.ini.template => MySQL 設定檔
執行時會依上述 template 產生正確路徑的設定檔,所以本伺服器放在任何路徑皆可執行。
本伺服器所使用的軟體版本:
* Apache 2.2.4
* PHP 5.2.4
* MySQL 5.0.45
* Zend Optimizer 3.3.0
* ActivePerl 5.8.8.822
APM Express 控制程式是由對岸 dualface 所開發。
ChangLog:
* 2007/09/02 更新:
- PHP 5.2.3 to 5.2.4
- MySQL 5.0.41 to 5.0.45
- phpMyAdmin 2.10.3 to 2.11.0
- Zend Optimizer 3.2.8 to 3.3.0
* 2007/08/10 更新:
- phpMyAdmin 2.10.3
- 加入 ActivePerl 5.8.8.822
- 10月 28 週二 200822:42
[轉貼] Acer Aspire One BIOS Recovery
本文出自:macles*
本篇是說明AsipreONE故障修復的處理方式。
本篇是說明AsipreONE故障修復的處理方式。
- 10月 27 週一 200811:15
[轉貼] How to Fix Ubuntu 8.04 Casper script for Persistence
本文出自:pendrivelinux
Along with the final release of Ubuntu 8.04 came a bug which broke the persistence feature, ultimately dropping the user to a shell when booting with the persistent option. As it turns out, the problem lies with permissions being set to 755 for the cow device (strangely enough the prereleases did not have this problem). In the following tutorial, I will show you how to quickly fix the problem. This is the same process we used to create the custom initrd.gz file that is distributed with our Ubuntu, Kubuntu and Xubuntu 8.04 Hardy Heron related USB flash drive installation tutorials.
Along with the final release of Ubuntu 8.04 came a bug which broke the persistence feature, ultimately dropping the user to a shell when booting with the persistent option. As it turns out, the problem lies with permissions being set to 755 for the cow device (strangely enough the prereleases did not have this problem). In the following tutorial, I will show you how to quickly fix the problem. This is the same process we used to create the custom initrd.gz file that is distributed with our Ubuntu, Kubuntu and Xubuntu 8.04 Hardy Heron related USB flash drive installation tutorials.
