linux
iteye_16590
这个作者很懒,什么都没留下…
展开
-
ar description
ar is considered a binary utility because archives of this sort are most often used as libraries holding commonly needed subroutines.Linux Library Types:There are two library types which can b...原创 2009-02-24 15:30:47 · 113 阅读 · 0 评论 -
find使用例子
http://johnmeister.com/CS/UNIX/FIND/find-usage.html sudo find / -type f -name *.jpg -exec cp {} . \;find . -type f -size +10000 -exec ls -al {} \;find . -atime +1 -type f -exec mv {} TMP ...原创 2010-01-12 18:33:20 · 176 阅读 · 0 评论 -
在不真正了解一门东西前不要乱用
比如说nginx,如果没有真正去认真读完相关文档,认真的去测试各样的配置参数,准备好了应对出现的各种各样的问题,如502...,就不要轻易的使用。要使用一个东西,需要能够把握并能控制住风险...原创 2010-02-04 10:12:22 · 125 阅读 · 0 评论 -
EIOffice在64bit ubuntu上装不上原因是兼容包
sudo apt-get install ia32-libs*然后sudo -i./setup.sh就OK了2009-09-25 10:36:26 · 104 阅读 · 0 评论 -
FHS note
Filesystem Hierarchy Standardhttp://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE18文件布局标准,当前版本部分遵守1,/srv ?大家都安装自己的方式进行2,标准的格式:PurposeRequirementsSpecific options...2009-09-27 09:46:35 · 57 阅读 · 0 评论 -
"/proc"学习
1,The Proc psuedo file system is a real time, memory resident file system that tracks the processes running on your machine and the state of your system.2, certain parts of the /proc file system can...原创 2009-09-27 10:11:29 · 86 阅读 · 0 评论 -
inotify使用
注意: There are race conditions in the recursive directory watching code which can cause events to be missed if they occur in a directory immediately after that directory is created. This is ...原创 2009-09-27 10:43:25 · 67 阅读 · 0 评论 -
ext2/ext3 32000限制
为什么有32000限制?ext2/ext3有此限制,xfs无,reiserfs限制数量要大些.mkdir: cannot create directory `test`: Too many links。I already talked to Drew, there is a limit of 32,000 links in an inode,which in turn li...原创 2009-09-27 16:20:45 · 229 阅读 · 0 评论 -
一个分布式框架高性能消息服务框架
http://www.spread.org/有时间可以研究下,核心是组织的思想原创 2009-10-11 22:20:39 · 90 阅读 · 0 评论 -
玩具程序和真实程序
一个简单的more程序实现代码不到100行看linux下more源码实现2000多行错误处理功能设置环境设置...原创 2009-10-12 14:23:59 · 354 阅读 · 0 评论 -
write your own "who"
warning: incompatible implicit declaration of built-in function 'exit'少了#include is by far the best solution.1)man who2)info coreutils 'who invocation'3)man -k utmp4)man 5 utmp5)read ...原创 2009-10-12 17:59:18 · 77 阅读 · 0 评论 -
最大目录深度
[code="java"]#!/bin/shcount=0while truedo mkdir deep-well if [ $? -ne 0 ]; then echo "max dir deepth :$count" break fi count=$((count+1)) cd deep-...原创 2009-10-14 11:20:16 · 163 阅读 · 0 评论 -
awk 统计行总值
[code="java"]awk -F"," 'ttl += $2 {print $2}' r1.csv | sort -n > tawk -F"," ' { ttl += $2; }END { print ttl }' r1.csv[/code]2009-07-07 14:05:08 · 209 阅读 · 0 评论 -
cups printer
[code="java"]http://127.0.0.1:631/printers/Description: hpLocation: http://10.218.98.2:9100Printer Driver: HP LaserJet Series PCL 4/5, 1.3Printer State: idle, accepting jobs, published.Dev...原创 2009-05-05 15:03:38 · 184 阅读 · 0 评论 -
spinlock
spinlock is a lock where the thread simply waits in a loop("spins") repeatedly checking until the lock becomes available.-->it's busy waiting-->only likely to be locked for a short period of time....原创 2009-12-05 15:23:19 · 88 阅读 · 0 评论 -
so description
How to generate a shared object: (Dynamically linked object library file.) Note that this is a two step process. 1. Create object code 2. Create library 3. Optional: create default versi...2009-02-24 17:02:34 · 76 阅读 · 0 评论 -
模拟负载
因为要测试一程序在重负载下的表现,所以需要简单的模拟负载:一,CPU负载模拟[code="java"]dd if=/dev/zero bs=128M | gzip | gzip-d | gzip | gzip -d > /dev/null[/code]多开几个,就不行搞不死你的CPU二,网络负载模拟使用nc[code="java"]server.sh#!...2009-04-16 13:37:06 · 439 阅读 · 0 评论 -
每个成熟的C语言软件都有自己的扩展库
无论apache,mysql,php都针对具体的需求,拥有自己的控制的库,C在真实的项目中并不原始原创 2009-10-21 15:30:50 · 255 阅读 · 0 评论 -
security linux
Boot security=========================================BIOS pwdGRUB pwdKERNEL check the dmesg file cpu,mem,hardware,kernel versionINIT1, default run-level to 3 from 5 a. n...原创 2009-10-21 22:27:25 · 62 阅读 · 0 评论 -
编译apache模块
以前编译安装的时候忘记了mod_rewritehanyh@hanyh-sina:~/download/httpd-2.2.14/modules/mappers$/opt/apache/bin/apxs -c mod_rewrite.c /opt/apache/build/libtool --silent --mode=compile gcc -prefer-pic -DLINUX=2 ...原创 2009-10-22 14:58:04 · 109 阅读 · 0 评论 -
第一次用git 和手册
一,git clone [email protected]:quark/fouge.git出现permission denied解决方式:1. ssh-keygen -t rsa 会生成两个文件 id_rsa, id_rsa.pub 2. 把id_rsa.pub里的东西添加到git account里的SSH Public Keys。二,然后输入passpharse,git c...原创 2009-11-02 10:46:10 · 152 阅读 · 0 评论 -
ubuntu上使用gitweb
[code="java"]step 1:apt-get install gitweb ....step 2:hanyh@hanyh-laptop:~/workspace/git$ more /etc/gitweb.conf # path to git projects (.git)#$projectroot = "/var/cache/git";$projectr...原创 2009-11-06 10:36:13 · 78 阅读 · 0 评论 -
shell 递归调用自己
[code="java"]#!/bin/shif test "$2" = ""; then echo "Usage: $0 basedir depth" exit 1fiif test "$2" = "0"; then exit 0fifor i in a b c d e f ; do path="$1/$i" mkd2009-11-20 11:46:38 · 624 阅读 · 0 评论 -
C保留字
原来只认为是基本的函数,库名字,今天看libc manual发现限制更加多You only need to worry about these restrictions if your program includes thatparticular header file.The header file ‘dirent.h’ reserves names prefixed with ‘...2009-12-05 13:49:50 · 105 阅读 · 0 评论 -
source code
_LARGEFILE64_SOURCE#define _GNU_SOURCE#define _BSD_SOURCE#define _SVID_SOURCE_THREAD_SAFE能使用相应的库和MACRO原创 2009-12-05 14:01:48 · 99 阅读 · 0 评论 -
volatile busy wating
consequently C++, the keyword was intended to:[citation needed] * allow access to memory mapped devices * allow uses of variables between setjmp and longjmp * allow uses of variables ...原创 2009-12-05 15:14:51 · 78 阅读 · 0 评论 -
设计的解耦合
一个项目要接收大量上传文件,简单的分为3层:1,前端(ActiveX控件或Firefox插件)---->前端接收服务器------>存储服务器 | DB,Memcahe等2,在设计的时,把每一个前端接收服务器作为一个独立的工作单元,对外的依赖只限于...原创 2010-10-26 15:37:35 · 201 阅读 · 0 评论