几个mail server

http://www.iredmail.org/

http://www.thismail.org/bbs/forum-17-1.html

qmail 解决方案 http://www.qmailrocks.org/

http://www.qmailrocks.org/

qmail qmailanalog 报错sort: open failed: +2

执行var/qmail/bin/qmailstats 的时候报错:

sort: open failed: +2: No such file or directory
sort: open failed: +2: No such file or directory

Google了会 找到了答案:

编辑/usr/local/qmailanalog/bin 下的 zdeferrals, zfailures 和 zsuccesses文件

将参数 'sort +2'  改为 'sort -k 3′

在执行就ok了

crontab 任务调度 编辑 查看

编辑crontab

# crontab -u root -e
*/5 * * * * /home/root/zbb/aaa.sh

查看crontab
# crontab -u root -l
*/5 * * * * /home/mmroot/zbb/aaa.sh


作者主页: http://blog.sina.com.cn/xunyiqq

 

cron任务调度

/etc/crontab

第1列分钟1~59
第2列小时1~23(0表示子夜)
第3列日1~31
第4列月1~12
第5列星期0~6(0表示星期天)
第6列要运行的命令

下面是crontab的格式:
分 时 日 月 星期 要运行的命令

这里有crontab文件条目的一些例子:

30 21 * * * /usr/local/apache/bin/apachectl restart
上面的例子表示每晚的21:30重启apache。

45 4 1,10,22 * * /usr/local/apache/bin/apachectl restart
上面的例子表示每月1、10、22日的4 : 45重启apache。

10 1 * * 6,0 /usr/local/apache/bin/apachectl restart
上面的例子表示每周六、周日的1 : 10重启apache。

0,30 18-23 * * * /usr/local/apache/bin/apachectl restart
上面的例子表示在每天18 : 00至23 : 00之间每隔30分钟重启apache。

0 23 * * 6 /usr/local/apache/bin/apachectl restart
上面的例子表示每星期六的11 : 00 pm重启apache。

* */1 * * * /usr/local/apache/bin/apachectl restart
每一小时重启apache

* 23-7/1 * * * /usr/local/apache/bin/apachectl restart
晚上11点到早上7点之间,每隔一小时重启apache

0 11 4 * mon-wed /usr/local/apache/bin/apachectl restart
每月的4号与每周一到周三的11点重启apache

0 4 1 jan * /usr/local/apache/bin/apachectl restart
一月一号的4点重启apache

 

windows下的免费邮件服务器 hMailServer

 

官方网站:http://www.hmailserver.com/

 

hMailServer is a free e-mail server for Microsoft Windows. It's used by Internet service providers, companies, governments, schools and enthusiasts in all parts of the world.

It supports the common e-mail protocols (IMAP, SMTP and POP3) and can easily be integrated with many existing web mail systems. It has flexible score-based spam protection and can attach to your virus scanner to scan all incoming and outgoing email.

监视top10进程

top -d 1 | head -n 17 | tail -n 11

Fortunately, we have watch to help, but you needs to put top in batch mode, and also you can ask top to stop after done displaying the result for one time. This will increase the accuracy of the result.

watch -n 1 "top -b -n 1 | head -n 17 | tail -n 11"

使用命令排名

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' |  \
grep -v "./" | \
column -c3 -s " " -t | \
sort -nr | nl |  head -n10

 

来源:http://linux.byexamples.com/archives/332/what-is-your-10-common-linux-commands/

1  328  32.8%  ls
     2  223  22.3%  cd
     3  49   4.9%   exit
     4  42   4.2%   tail
     5  21   2.1%   vi
     6  15   1.5%   ps
     7  14   1.4%   tracepath
     8  14   1.4%   ping
     9  13   1.3%   vim
    10  13   1.3%   df

linux 查看自己系统装于何时命令行:

$ ls -lct /etc/ | tail -1 | awk '{print $6, $7, $8}'

PDF 下载:最牛B的 Linux Shell 命令

来源:http://wowubuntu.com/linux-shell-pdf.html

事实上,在前段时间”最牛B的 Linux Shell 命令 系列连载” 文章已经全都发布完了,共 4 篇,在此先要感谢 Isppy 的及 boypt 的辛勤努力。

现在我已经把它制作成了 PDF 电子版,便于让大家能更好阅读此系列文章,请到以下地址下载。

下载地址:51CTO / UUShare

如何用 Rsync 来备份 Linux 文件

参考 : http://www.thegeekstuff.com/2010/09/rsync-command-examples/

来源:http://wowubuntu.com/rsync.html

:下面所有例子中 – - 之间实际上是没有空格的,使用时请删除空格。

Rsync是一个远程数据同步工具,可通过LAN 或互联网快速同步多台主机间的文件。Rsync 本来是用以取代 rcp的一个工具,它当前由 rsync.samba.org 维护。Rsync 使用所谓的”Rsync演算法”来使本地和远程两个主机之间的文件达到同步,这个算法只传送两个文件的不同部分,而不是每次都整份传送,因此速度相当快。

Rsync 的特色:

  • 快速:第一次同步时 rsync 会复制全部内容,但在下一次只传输修改过的文件。
  • 安全:rsync 允许通过 ssh 协议来加密传输数据。
  • 更少的带宽:rsync 在传输数据的过程中可以实行压缩及解压缩操作,因此可以使用更少的带宽。
  • 特权:安装和执行 rsync 无需特别的权限