用户登陆
用户名:
密  码:
验证码:刷新验证码
 

技术文档
日记 (20)
照相馆 (39)
美食 (12)
风景 (4)
javascript+css (11)
php (9)
mySQL (17)
unix (22)
linux (28)
perl (4)
English (43)
flash (11)
其它 (37)
站内公告
偶还有个blog,,http://qiuqiu.showxm.com就是乱写。。。

站点日历
<<  <  2010 - 09  >  >>
SuMoTuWeThFrSa
   1234
567891011
12131415161718
19202122232425
2627282930

最新日志
- 猜火车
- PET3
- phpmyadmin导入数据
- XP写权限
- 计划安排
- 老美英语口头禅,应该学习...
- 外贸人应该必会的英语知识...
- 在外企生存必会的外贸英语...
- 常用外贸术语大全,外贸人...
- 经典商务英语电话报价对话...

最新评论
- 页面有问题鸟~~~~
- 没拍几张啊西西...
- 怎么就这些...应该还有吧...
- 不小心把laochen的评论删...
-
- 貌似未成年的样子
- 来看一下你所写,欢迎回访...
- 因为有所期待,才会失望。...
- 快过年了, 我想念我的家乡...
- ZHONG回不了家啊,,要在异...

日志搜索

站点统计

日志: 257 篇
评论: 39027 篇
引用: 0 个
会员: 69 人
访问:5964219 次
建立: 2007-01-09

+ 本站LOGO +

友情链接
lily
speak2me
孟子E章
pconline视频教程
蛋蛋
朱威廉
短文摘抄
泰国化妆网站
绿色软件站

+ 更多链接 +
<< | < | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | > | >> 浏览样式: 正常模式 | 列表模式
其它 S5500手动对焦   [ 日期: 2009-05-19 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]
先是解除AF/MF的锁定(左上),调到MF,按下右上(+/-)的按钮的同时,通过W,T(变焦功能键)来实现。

作者: qiuqiu | 分类: 其它 |  评论: 0  |  引用: 0  | 浏览: 168

照相馆 自拍   [ 日期: 2009-05-10 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]





作者: qiuqiu | 分类: 照相馆 |  评论: 0  |  引用: 0  | 浏览: 164

unix freebsd find命令用法   [ 日期: 2009-04-20 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]
使用 find 搭配 rm 刪除大量檔案 find ./ -iname 'test-file-*' | xargs rm -rf

find命令是功能最强的命令之一,但同时也是命令行结构最难以掌握的命令之一。
# find / -print | wc -l 显示系统中所有文件和目录的数目。
# find / -user $LOGNAME -print 显示系统中该用户所有文件和目录。
# find / -size 100 -print 显示文件大小为100 blocks。
# find / -size -100 -print 显示文件大小小于100 blocks 。
# find / -size +100 -print 显示文件大小大于100 blocks 。
# find / -name core -exec rm {} \;查找并删除core文件。
# find . -exec chown $LOGNAME {} \; 修改一个目录下的所有文件的用户所属。
# find .-type d -exec chmod 770 {} \;修改一个目录下的所有目录的权限。


find :(以下均在hp-unix下操作的)
find ./dir -mtime +10 -exec rm -rf {}\; 在dir目录下找到10天之前的文件,然后删除。 e x e c选项后面跟随着所要执行的命令,然后是一对儿{ },一个空格和一个\,最后是一个分号。
find ./dir -mtime +20 | xargs rm 在dir目录找到20天之前的文件并删除。 xargs 比直接带-exec选项的效率和性能都好
find ./dir -mtime -2 在dir目录下查找两天之内的文件
find ./dir -mtime +3 在dir目录下查找三天之前的文件
find ./dir -user fly 在dir目录下查找属于fly用户的文件
find ./dir -group user 在dir目录下查找属于user组的文件
find ./dir -type d 在dir目录下查找文件类型为目录的文件
find ./dir -name "*.sh" -depth 在使用f i n d命令时,可能希望先匹配所有的文件,再在子目录中查找。使用d e p t h选项就可以使f i n d命令这样做

找unix机器中所有包含"jdbc/WapDataSource"字符串的文件

find / grep "jdbc/WapDataSource"

find / -name httpd.conf
find / -name access_log 2>/dev/null
find /etc -name '*srm*'
find / -amin -10 # 查找在系统中最后10分钟访问的文件
find / -atime -2 # 查找在系统中最后48小时访问的文件
find / -mmin -5 # 查找在系统中最后5分钟里修改过的文件
find / -mtime -1 #查找在系统中最后24小时里修改过的文件
find / -cmin -5 # 查找在系统中最后5分钟里被改变状态的文件
find / -ctime -1 #查找在系统中最后24小时里被改变状态的文件
find / -user reda #查找在系统中属于fred这个用户的文件
find / -not -user reda #查找在系统中不属于FRED这个用户的文件
find / -group redagrp # 查找在系统中属于redagrp组的文件
find / -gid 501 #查找系统中属于组id为501的文件
find / -user fred -a -group redagrp
find / -user reda -o -user tracy
find / -nouser #查找在系统中属于作废用户的文件
find / -empty # 查找在系统中为空的文件或者为空的文件夹
find / -false #查找系统中总是错误的文件
find / -size +5k #查找系统中大于5k字节的文件
find / -size +5c #查找系统中大于5字节的文件
find / -perm +6000
find / -type b
文件类型:
b 块(缓冲)设备.
c 字符设备.
d 目录.
p 有名管道(FIFO).
f 规则文件.
l 符号链结.
s 插座.
find / -maxdepth 2 -name fred
find /tmp -size +10000000c -and -mtime +2
find / -user reda -or -user tracy
find /tmp ! -user reda
find / -name 'httpd.conf' -ls
find / -user reda -exec ls -l {} \;
find / -user reda -ok #确认后执行
find / -user reda | xargs ls -l


作者: qiuqiu | 分类: unix |  评论: 0  |  引用: 0  | 浏览: 666

unix freebsd 添加sata大硬盘   [ 日期: 2009-04-20 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]
freebsd 添加sata硬盘直接用sysinstall会有错误警告,改用gpt挂分区

gpt create -f /dev/da1
gpt create -f /dev/da2
gpt create -f /dev/da3
gpt create -f /dev/da4
gpt create -f /dev/da5

gpt show -l /dev/da2
查出分区的块大小是:8606187453
准备分四片,所以每片是:2151546863

然后执行下面命令,-s是指定分区大小:
gpt add -s 2151546863 -t ufs /dev/da2 (将产生/dev/da2p1)
gpt add -s 2151546863 -t ufs /dev/da2 (将产生/dev/da2p2)
gpt add -s 2151546863 -t ufs /dev/da2 (将产生/dev/da2p3)
gpt add -t ufs /dev/da2 (把剩余的全做为最后一个分区)

gpt add -t ufs /dev/da1
gpt add -t ufs /dev/da2
gpt add -t ufs /dev/da3
gpt add -t ufs /dev/da4
gpt add -t ufs /dev/da5

下面重新格式化文件系统:
newfs -m 0 /dev/da1p1
newfs -m 0 /dev/da2p1
newfs -m 0 /dev/da3p1
newfs -m 0 /dev/da4p1
newfs -m 0 /dev/da5p1


挂载分区:
mount /dev/da2p1 /mnt/da2p1
mount /dev/da2p2 /mnt/da2p2
mount /dev/da2p3 /mnt/da2p3
mount /dev/da2p4 /mnt/da2p4

然后再写入/etc/fstab



作者: qiuqiu | 分类: unix |  评论: 0  |  引用: 0  | 浏览: 706

照相馆 面具   [ 日期: 2009-02-03 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]
依然是这颗大树,,
谁让它长在家门口,,嘻嘻。。。
拍了又拍。。。
春节过得有点抑郁,,
但,还算是开心的
明天会更好~~






作者: qiuqiu | 分类: 照相馆 |  评论: 0  |  引用: 0  | 浏览: 212

English 词人嗤语88   [ 日期: 2008-12-17 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]
Use & utilize 利用
Inter 埋葬 & inner 内部的
Inner Mongolia 内蒙
Inter 埋葬 & internal 内在的
Internal memory 内存储器,内在记忆装置
Inner & internal 注意两个词的区别,自己体会,没办法讲明白
Mao & Maoist 毛泽东主义者
Blank & blanket 毯子 & quilt
Invent 发明 & inventor 发明家 & inventory 存货,总量
Mustache 嘴巴上的胡子 & beard 挂面胡须
Mustard 芥末 & mustache 胡子
On the run 在逃跑中
Note & notable & notably 显著的
Hormone 荷尔蒙
Growth hormone 生长激素
Bull & cow & bovine 牛的
BGH = bovine growth hormone 牛生长激素
Combine 组合 & recombinant 重组子
rGBH = recombinant bovine growth hormone 重组牛生长激素
Wikipedia 维基百科 & encyclopedia 百科全书
Take root 扎根,生根
These fears may be taking root with consumers, which are asking for non-rBGH milk in increasing numbers.
Stand-alone 独立的
A stand-alone terminal 独立终端
Close & disclose 透漏
The company has not disclosed its milk vendors but says they have several throughout the country serving different regions.
Roll out 铺开
Organic and hormone-free milk now line the shelves of most major supermarkets. Even retailing giant Wal-Mart Stores Inc. has rolled out its own brand of organic milk in the past year.
Inc. = incorporation 公司
Not-to-distant future 不远的将来
注意,不是"not-too-distant future"
Speculate 推测
Fill one's need 满足需要
If customer demand for hormone-free milk continues to grow, producers and farmers may be forced to make the switch to fill retailers' needs
Fraught 充满的 & be fraught with 充满了。。。
Stomach 胃,引申为"忍受"的意思
Corporation & incorporation 不知道有什么区别,好像都是公司的意思
Latte 1/3的浓咖啡+2/3的牛奶
Outside Italy since the early 1980s, a latte is prepared with approximately one third espresso and two-thirds steamed milk. Thus it has more milk than a cappuccino, and has a milder, milkier taste.
Daily & dairy 牛奶场,牛奶制品
Dairy cattle 奶牛
Lactate 分泌乳汁 & lactation 哺乳期
The hormone is administrated to dairy cattle during the middle phase of lactation to boost milk production.
Control & controversy & controversial 有争议的
Spark 引发,触发
The hormone—administrated to dairy cattle during the middle phase of lactation to boost milk production—has sparked controversy since it was first approved by the Food and Drug administration in 1993. 引发争论
Advise & advocate 主张 & advocacy
Some economists strongly advocate the reform of government ownership of industry.
有些经济学家极力主张改革国营企业。
A matter of time 时间问题
It's only a matter of time before all consumers drink hornone-free milk.
In turn 反过来
The increase in demand for the products would push suppliers to provide more offerings and in turn, reduce prices of the goods.
Restaurant 餐馆 & restaurateur 餐馆老板,这个变形很怪,注意!
Produce & producer 很容易误认为是producter,其实没有这个词
Pull & pullover 拉出来?就是"套头衫"啦
Question & query 疑问
For queries, contact with the seminar director.
AIDS = Acquired Immure Deficiency Syndrome 爱滋病, 获得性免疫功能丧失综合症
HIV = Human Immunodeficiency Virus 人体免疫缺损病毒,艾滋病病毒
Shape 体现
The economic and legal systems of a country are shaped by its political system.
Dimension 方面
Political economy can be assessed according to two dimensions.
Collectivism 集体主义 & individualism 个人主义
Self-expression 自我表现
Self-expression must pass into communication.
Right-wing 右翼
Market economy 市场经济 & command economy 调控经济
Civil war 内战 & civil law民法
The right and obligation 权利和义务
Mafia黑手党
An alleged international criminal organization believed active, especially in Italy and the United States, since the late 19th century. 黑手党:被指控为跨国界际的犯罪组织,自19世纪以来在意大利和美国特别活跃
Intelligent 聪明的 & intellectual 知识的,智力的
Intellectual property 知识产权
Assets 资产 & liability 责任
Lower 较低的 & upper 较高的
Lower middle income ; upper middle income
作者: qiuqiu | 分类: English |  评论: 0  |  引用: 0  | 浏览: 1321

日记 蛋的梦   [ 日期: 2008-12-08 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]
蔡阿蛋 16:06:14
梦中你好像在我们公司斜对面上班,有一天,我过去找你玩,突然在那个大厦的大堂里面就看到你了,我问你怎么在这,你说你谈恋爱了,是公司的同事,也辞职了,开店。。你的店就在那个大堂里,卖的是真丝围巾,我正在那边看你的围巾啊,突然从楼上飘下一个很漂亮的气球,近了一看才知道那是你BF从公司拉下来送花给你的,里面写满了真情告白。。哈哈

好像很久很久以前也做过这样的梦,是不是梦说出来就不会成真了,,,想象一下也是件浪漫的事~~~~~
作者: qiuqiu | 分类: 日记 |  评论: 0  |  引用: 0  | 浏览: 281

unix FreeBSD 防火墙的安装和设置   [ 日期: 2008-11-25 | 来源: 本站原创 | Sunny | Emotion Index: +2 ]
FreeBSD自带有一个基于包过滤的防火墙--ipfw,虽然功能没有专业防火墙那么强大,但是应付一个Web站点的安全还是足够的,所以我们决定选用该防火墙来保护我们的Web服务器。

1. 安装ipfw

IPFW 的主要部分是在内核中运行的, 因此会需要在FreeBSD内核配置文件中添加部分选项。(注意,如果你没有安装FreeBSD核心源代码,是无法进入以下目录的,所以运行之前一定要先安装内核源代码)我们先进入内核配置文件:

# cd /sys/i386/conf

# cp GENERIC ./kernel_fw

打开内核配置文件:

# ee ./kernel_fw

添加四个选项,不需要后面的注释信息:

options IPFIREWALL # 将包过滤部分的代码编译进内核。

options IPFIREWALL_VERBOSE

# 启用通过syslogd记录的日志。如果没有指定这个选项,即使您在过滤规则中指定记录包, 也不会真的记录它们

options IPFIREWALL_VERBOSE_LIMIT=10

# 限制通过 syslogd(8) 记录的每项包规则的记录条数。在恶劣的环境中如果您想记录防火墙的活动, 而又不想由于 syslog 洪水一般的记录而导致拒绝服务攻击, 那么这个选项将会很有用。

options IPFIREWALL_DEFAULT_TO_ACCEPT

# 这将把默认的规则动作从 ``deny'' 改为 ``allow''。这可以防止在没有配置防火墙之前使用启用过 IPFIREWALL 支持的内核重启时把自己锁在外面。 另外, 如果您经常使用 ipfw(8) 来解决一些问题时它也非常有用。 尽管如此,在使用时应该小心, 因为这将使防火墙敞开, 并改变它的行为。

编译内核:

# /usr/sbin/config kernel_fw

# cd ../compile/kernel_fw (注意你的版本,如果是低于5.0的版本用../../compile/kernel_fw)

# make depend

# make

# make install

重启系统。注意,我们没有选择options IPFIREWALL_DEFAULT_TO_ACCEPT该选项,就是说默认系统启动后是打开防火墙的,并且防火墙默认是不允许任何连接的(deny from any to any),所以一定要在本地操作,否则你将被"锁在门外",如果你选择了该选项则可以使用ssh等连接不受影响,不过这相对不安全。

2. 配置ipfw

如果配置普通情况下的规则,使用命令配置的模式:

ipfw的配置命令:ipfw [-N] 命令 [编号] 动作 [log(日志)] 协议 地址 [其它选项]

例如:

# ipfw add allow tcp from any to 10.10.10.1 80 #允许外界访问我的web服务

# ipfw add allow tcp from any to 10.10.10.1 21 #允许外面访问我的ftp服务

# ipfw add allow tcp from any to 10.10.10.1 22 #允许外界访问我的ssh服务

如果使用规则包的形式,那么查看下面内容。

系统启动后,我们还要配置rc.conf文件来运行我们的防火墙:

# ee /etc/rc.conf

加入如下内容:

gateway_enable="YES" # 启动网关

firewall_enable="YES" # 激活firewall防火墙

firewall_script="/etc/rc.firewall" # firewall防火墙的默认脚本

firewall_type="/etc/ipfw.conf" # firewall自定义脚本

firewall_quiet="NO" # 起用脚本时,是否显示规则信息。现在为"NO"假如你的防火墙脚本已经定型,那么就可以把这里设置成"YES"了。

firewall_logging_enable="YES" # 启用firewall的log记录。

设置完成后我们再编辑/etc/syslog.conf文件:

# ee /etc/syslog.conf

加入以下行:

!ipfw

*.* /var/log/ipfw.log


现在到了最重要的编辑规则包了:

# ee /etc/ipfw.conf

我们添加一下规则:(注意 10.10.10.1是我们服务器的IP)

######### TCP ##########

add 00001 deny log ip from any to any ipoptions rr

add 00002 deny log ip from any to any ipoptions ts

add 00003 deny log ip from any to any ipoptions ssrr

add 00004 deny log ip from any to any ipoptions lsrr

add 00005 deny tcp from any to any in tcpflags syn,fin

# 这5行是过滤各种扫描包

add 10001 allow tcp from any to 10.10.10.1 80 in # 向整个Internet开放http服务。

add 10002 allow tcp from any to 10.10.10.1 21 in # 向整个Internet开放ftp服务。

add 10000 allow tcp from 1.2.3.4 to 10.10.10.1 22 in

# 向Internet的xx.xx.xx.xx这个IP开放SSH服务。也就是只信任这个IP的SSH登陆。

# 如果你登陆服务器的IP不固定,那么就要设为:add 10000 allow tcp from any to 10.10.10.1 22 in

add 19997 check-state

add 19998 allow tcp from any to any out keep-state setup

add 19999 allow tcp from any to any out #这三个组合起来是允许内部网络访问出去,如果想服务器自己不和Internet进行tcp连接出去,可以把19997和19998去掉。(不影响Internet对服务器的访问)

########## UDP ##########

add 20001 allow udp from any 53 to 10.10.10.1 # 允许其他DNS服务器的信息进入该服务器,因为自己要进行DNS解析嘛~

add 29999 allow udp from any to any out # 允许自己的UDP包往外发送。

########## ICMP #########

add 30000 allow icmp from any to any icmptypes 3

add 30001 allow icmp from any to any icmptypes 4

add 30002 allow icmp from any to any icmptypes 8 out

add 30003 allow icmp from any to any icmptypes 0 in

add 30004 allow icmp from any to any icmptypes 11 in

#允许自己ping别人的服务器。也允许内部网络用router命令进行路由跟踪。
作者: qiuqiu | 分类: unix |  评论: 0  |  引用: 0  | 浏览: 565

<< | < | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | > | >>

           Copyright © 2006 qiuqiu.wumingzhi.com, All Rights Reserved.
Processed in 0.109375 second(s)