2006-09-30

认识wget的另外几个选项

控制下载文件的总量。当流量有限制时,这是一个很好的选项。
-Q quota
--quota=quota

Specify download quota for automatic retrievals. The value can be specified in bytes (default), kilobytes (with k suffix), or megabytes (with m suffix).

Note that quota will never affect downloading a single file. So if you specify
wget -Q10k ftp://wuarchive.wustl.edu/ls-lR.gz
all of the ls-lR.gz will be downloaded.
The same goes even when several URLs are specified on the command-line. However, quota is respected when retrieving either recursively, or from an input file. Thus you may safely type wget -Q2m -i sites---download will be aborted when the quota is exceeded.

Setting quota to 0 or to inf unlimits the download quota.

控制文件下载类型和文件所属域名
-A acclist --accept acclist
-R rejlist --reject rejlist
Specify comma-separated lists of file name suffixes or patterns to accept or reject.
You want to download all the GIFs from a directory on an HTTP server.  You tried wget http://www.server.com/dir/*.gif, but that didn't work because HTTP retrieval does not support globbing.  In that case, use:
wget -r -l1 --no-parent -A.gif http://www.server.com/dir/

-A.gif means to download only the GIF files, -A "*.gif" would have worked too.
-D domain-list
--domains=domain-list
Set domains to be followed. domain-list is a comma-separated list of domains. Note that it does not turn on -H.

--exclude-domains domain-list
Specify the domains that are not to be followed.

指定文件下载后保存的目录
-P

2006-09-24

Evolution启动出错

今天启动Evolution 2.6时发现启动出错,无法读取配置文件,错误提示为:
Error: An error ocurred while loading or saving configuration information for Nautilus. Some of your configuration settings may not work properly。

点击OK之后,又出现提示:
Adding client to server's list failed, CORBA error: IDL:omg.org/CORBA/COMM_FAILURE:1.0

察看/var/log/messages日志文档,发现纪录:
Sep 24 18:48:33 localhost gconfd (jiad4701-24732): Failed to get lock for daemon, exiting: Failed to lock '/tmp/gconfd-jiad4701/lock/ior': probably another process has the lock, or your operating system has NFS file locking misconfigured (Resource temporarily unavailable)
于是把ior文件改名后再启动evolution就没有问题了。
jiad4701@gepc188:/tmp/gconfd-jiad4701/lock$ mv ior ior.bak
不知道这个问题的症结在哪儿。

2006-09-23

删除HTML标记

删除HTML文件里的标记,看似一个简单的文本替换,但是关键是如何写匹配的正则表达式。


像下面这样的命令是不能完成的。
$ sed -e 's/< .*>//g' myfile.html


因为当 sed 试图在行中匹配规则表达式时,它要在行中查找最长的匹配


解决办法是,不输入“'< ' 字符后面跟有一些字符并以 '>' 字符结束”的规则表达式,而只需输入一个“'< ' 字符后面跟有任意数量非 '>' 字符并以 '>' 字符结束”的规则表达式。这将与最短、而不是最长的可能性匹配。新命令应该是:


$ sed -e 's/< [^>]*>//g' myfile.html

2006-09-20

有关德国2006年的数字

德国的联邦统计局和分别位于曼海姆和柏林的两家研究调查机构共同发布了Datenreport 2006,收集整理了关于德国2006年的各种统计数据。联邦统计局的网页提供PDF文件全文下载

2006-09-19

Evolution的一个小问题

在使用Evolution 2.6.1时有时会得探出对话框,提示一个错误:
"Error while Expunging folder.
Error storing `~/.evolution/mail/local/Inbox (mbox)': Summary and folder mismatch,even after a sync."

解决办法是删除“~/.evolution/mail/local/Inbox.ev-summary”文件。

这应该是Evolution的一个Bug, http://bugzilla.gnome.org/show_bug.cgi?id=213072 。

在Ubuntu下安装zope 2.9.2

安装很简单,执行命令:

sudo apt-get install zope2.9

zope会被安装在/usr/lib/zope2.9/目录下。

执行/usr/lib/zope2.9/bin/mkzopeinstance.py可以创建一个zope instance。启动如果使用/ets/init.d/zope2.9脚本,总会报告找不到zope instance,无法启动。不过使用$instance/bin/zopectl脚本启动没有问题,只不过默认得端口不再是8080,而是9673。不知道在Ubuntu下安装这个版本,为什么默认端口会被改掉,8080端口保留给什么程序用呢。

2006-09-16

Outlook 2007 下修复pst文件

前段时间使用Outlook 2007程序不时死掉,因此暂时放到了一边。今天在网上看到微软发布了Office 2007 Beta 2 Technical Refresh,便去下载了一个升级文件,office2007b2tr-kb000000-fullfile-en-us.exe,个头不小,赶上Office 2003 professional的安装文件了,共507M。安装这个文件时间也花去了好几分钟时间,并且安装完成之后要求重启。重启之后打开Outlook 2007,发现外观上有了一些细微的改变,简单的整理了一下2006年的邮件,删除和移动了一些不重要的邮件,关闭Outlook 2007。没想到再打开这个程序时,就报错,说我的Outlook.pst不是一个personal folders file,Outlook无法打开。这下可坏了,我的重要邮件和联系人都在这个文件里,虽然有备份,可是是一个月前的。在网上搜索一番之后,知道微软提供一个叫做scanpst.exe的程序,用于修复损坏的pst文件。新版的Outlook安装时所带的scanpst.exe文件的位置与以前版本不同,它位于D:\Program Files\Office12\Office12目录下。用这个程序修复之后,Outlook能正常启动打开那个pst文件了,只是不知道有没有丢失邮件。看来beta版的东西使用还是要谨慎。

2006-09-13

Outlook 2003发信失败

从昨天中午开始,我就不能使用我的Outlook里的大学账户发信了。发信总得到错误提示:

Fehler (0x8004210B) beim Ausführen der Aufgabe "rzmail.uni-trier.de - 
Nachrichten werden gesendet": "Timeout beim Warten auf eine Antwort 
vom Postausgangsserver (SMTP). Wenn Sie diese Meldung weiterhin 
erhalten, wenden Sie sich an Ihren Serveradministrator oder Internetdienstanbieter."

琢磨半天,联系学校的postmaster和网管都没解决问题。后来重新启动outlook,问题到解决了!!