linux下 如果一个目录下有好多文件, 而且你又最近也修改了很多文件, 这时又想知道我最近修改了哪些文件, 那么ls或ll命令可以帮你实现
ls -t 加入-t选项就能按最后修改时间排序了,
如果想反序排列的话就用 ls -rt
用ll -t 或ll -rt会看得更清楚些
linux下 如果一个目录下有好多文件, 而且你又最近也修改了很多文件, 这时又想知道我最近修改了哪些文件, 那么ls或ll命令可以帮你实现
ls -t 加入-t选项就能按最后修改时间排序了,
如果想反序排列的话就用 ls -rt
用ll -t 或ll -rt会看得更清楚些
When i use php script to call perl script which will query the ldap , the perl function start_tls always return the error message “Operations error”, but it works well when call perl script directly with command line, it almost spent me a day to fix this problem, i finally found the root cause is that php process doesn’t have read permission to the cert/key file
chmod a+r /path/to/cert file
chmod a+r /path/to/key file
those two commands fixed the problem.
following code demo how php call perl:
$pipespec = array
(
1 => array('pipe', 'w'), // client's stdout
2 => array('pipe', 'w'), // client's stderr
);
$pipes = array();
$command = "/usr/bin/perl /path/to/perl/script.pl";
$process = proc_open($command, $pipespec, $pipes, $cwd, NULL);
在xp上装了eclipse和VMware, 在VMware上装了redhat, 在redhat上装了apache,php,xdebug,在php.ini里配置xdebug如下:
zend_extension=/usr/lib/php/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so
xdebug.remote_enable=On
xdebug.remote_autostart=On
xdebug.remote_handler=dbgp
xdebug.remote_host=xx.xx.xx.xx
xdebug.remote_port=9000
xdebug.remote_mode=req
然后在eclipse里设置断点,发现断点不起作用,直接所有的代码一次性运行完了,到xdebug官网仔细看了下配置的说明, 原来xdebug.remote_host并不是apache所在服务器的IP, 而是远程调试机的IP, 我的情况,也就是xp的ip, 而不是VMware上redhat的IP,可原来我却把xx.xx.xx.xx配成了redhat的IP, 修改xx.xx.xx.xx为xp的IP,重启apache, 一试,果然单步调试成功了。
今天想试一下zend studio, 在官方网下载好在win7下安装后,发现zend server其实就是apache, zend studio就是扩展了eclipse,但zend server/studio却还要收钱,真不知道是怎么遵守开源协议的。
创建一个test项目后,结果页面都打不开,返回的错误是这样的:Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
花了不少时间看它们配置,发现配置都没什么问题,有点恼火啊,功夫不负有心人,原来这个文件Zend\ZendServer\etc\ZendEnablerConf.xml 第一行出现了乱码:锘??xml version=”1.0″ encoding=”UTF-8″?>
把它改为:<?xml 就行了
前几天在MSDN上看到有人用shell写了个电话本程序,为了巩固一下以前学过的, 自己也来弄一个shell电话本[绝非抄袭]。其实不能算一个电话本,因为只有两个域:名字和地址,权当练习,不尽完美之处,请海涵:D
#!/bin/sh
#Date: 2010-08-22
#QQ: 32281309
#MSN: pgj1207@hotmail.com
#Site: www.genepeng.cn
function AddUser()
{
while :
do
echo -n “Enter user name: ”
read UserName
if [ "$UserName" = "" ]; then
continue
else
break
fi
done
while :
do
echo -n “Enter Address: ”
read Address
if [ "$Address" = "" ]; then
continue
else
break
fi
done
echo -e “$UserName\t$Address” >> $FileName
}
阅读这个条目剩下部分 »