coffee_cn

博客园 首页 新随笔 联系 订阅 管理

2009年11月9日 #

摘要: htmlspecialcharsaddslashesarray_unique 阅读全文
posted @ 2009-11-09 13:50 coffee 阅读(195) 评论(0) 推荐(0) 编辑

摘要: #!/bin/sh myPath="/var/log/httpd/"myFile="/var /log/httpd/access.log" #这里的-x 参数判断$myPath是否存在并且是否具有可执行权限if [ ! -x "$myPath"]; then mkdir "$myPath"fi#这里的-d 参数判断$myPath是否存在(判断目录是否存在)if [ ! -d "$myPath"];... 阅读全文
posted @ 2009-11-09 11:19 coffee 阅读(514) 评论(0) 推荐(0) 编辑

摘要: 总结下来两句命令完成增量备份:#tar -g snapshot -zcf full20091109.tar.gz test#tar -g snapshot -zcf inc20091109.tar.gz test利用shell实现每日自动增量备份:#!/bin/bashtToday=`date "+%Y%m%d"`if [ ! -d full20091109.tar.gz ]; then tar ... 阅读全文
posted @ 2009-11-09 10:47 coffee 阅读(260) 评论(0) 推荐(0) 编辑

摘要: SSH信任关系(machine A自动登录machin B)--实际上就是利用公钥登录。machine A#ssh-keygen -t rsa#scp .ssh/id_rsa.pub to machin Bmachin B#cat id_rsa.pub >>.ssh/authorized_keys#chmod 644 authorized_keys 阅读全文
posted @ 2009-11-09 10:26 coffee 阅读(238) 评论(0) 推荐(0) 编辑