[ -h "$element" -a ! -e "$element" ] [ -f /usr/bin/netscape -a -f /usr/share/doc/HTML/index.html ] 没见过这样的用法,请教一下是什么意思呀?
by camperbird - Shell - 2009-01-07 08:47:00 阅读(1330) 回复(8)
conn_num=$(cat /proc/sys/net/ipv4/ip_conntrack_count) if [ $conn_num -ge 80 ] then echo 1 >/proc/net/ipt_condition/conn1 else echo 0 >/proc/net/ipt_condition/conn1 fi iptables -t mangle -N condition_LMT iptables -t mangle -I FORWARD -m condition --condition conn1 -i br0 -m state --state NEW -j condition_LMT iptables -t mangle -A condition_LMT -p udp --dport 53 -j RETURN iptables -t mangle -A COND...
背景: 原来知道条件编程这回事,但从来没用过.现在需要了,而且要从Makefile获取宏.感觉不错,做以下记录. 正文:Macro condition compile 1. macro check in source codee.g. main.c#ifdef MACRO1 #indlcude "header1.h"#endif#ifdef MACRO2 #indlcude "header2.h"#endif 2. send macro by Makefile include Makefile.in gcc -D $MAC -o $OBJ $SRC #-D means de...
/* standard usage of pthread_cond_wait */ BYTE g_noFreeBuffer = 0; inline CmwMsgQBuffer_t * CmwGetFree() { CmwMsgQBuffer_t * retval = NULL; if (g_pFreeHdr == g_pFreeTail) { pthread_mutex_lock(&g_mutexNoBuf); while (g_pFreeHdr == g_pFreeTail) { g_noFreeBuffer = 1; pthread_cond_wait(&g_condNoBuf, &g_mutexNoBuf); } pthread_mutex_unlock(&g_mutexNoBuf); } retval = (CmwMsgQ...
warning: regex literal in condition warning: regex literal in condition 大神们, 怎么改下面的代码?不warning[code]#!/usr/bin/ruby -w while DATA.gets print if /begin/.. /stop/ end __END__ a begin 1 2 3 stop z s[/code]
有一个要求如下: 数据库是oracle, where condition中的是存在一个文件中, 不知道如何把它传进去[code]sqlplus -s user/password@instance << EOF >>output.txt set echo off head off feed off pagesize 0 trimspool on linesize 1000 colsep , select emp_no, emp_name from emp where emp_no in ('a', 'b', 'c', 'd'); exit; EOF[/code]文件格式如下:[code]a b c d[/code]请各位大师帮忙看看
solaris工作站外挂一scsi盘阵,时常盘阵自动掉,没有任何征兆或者操作就掉? dmesg结果如下: Jun 24 09:01:08 b2500-2 scsi: [ID 107833 kern.warning] WARNING: /pci@1d,700000/scsi@2/sd@0,0 (sd31): Jun 24 09:01:09 b2500-2 last message repeated 1 time Jun 24 09:01:09 b2500-2 Check condition on REQUEST SENSE Jun 24 09:01:10 b2500-2 scsi: [ID 107833 kern.warning] WARNING: /pci@1d,700000/scsi@2/sd@0,0 (sd31): Jun...
solaris工作站外挂一scsi盘阵,时常盘阵自动掉,没有任何征兆或者操作就掉? dmesg结果如下:\r\nJun 24 09:01:08 b2500-2 scsi: [ID 107833 kern.warning] WARNING: /pci@1d,700000/scsi@2/sd@0,0 (sd31):\r\nJun 24 09:01:09 b2500-2 last message repeated 1 time\r\nJun 24 09:01:09 b2500-2 Check condition on REQUEST SENSE\r\nJun 24 09:01:10 b2500-2 scsi: [ID 107833 kern.warning] WARNING: /pci@1d,700000/scsi@2/sd@0,0...
拿ip_conntrack为例, 在流量非常大的时候,cat /proc/net/ip_conntrack需要很长的时间, 如果cat返回之前,如果执行rmmod ip_conntrack会不会有问题? 以2.6.15为例,ip_conntrack_standalone.c 的简化框架见后。 问题是 1)在cat /proc/net/ip_conntrack的过程中,如果执行rmmod ip_conntrack, [2]会不会失败? 特别的会不会出现 remove_proc_entry: xxx busy, count=1; de_put: deferred delete of xxx 类似的消息...
Concurrency and Race condition in Linux 2.6 September 2, 2006 - 4:31am Submitted by dynamo2 on September 2, 2006 - 4:31am. Linux Device Driver Study Notes Concurrency and Race condition Summary: This document is a brief summary of reading Concurrent and Race condition chapter of Linux Device Driver. 1 Mutual exclusion Operations 1.1 Semaphores S...