ed编辑edaa.cawelcomtobeijinglearnlinux可以往aa.c里写入内容geditaa.c文本形式打开aa.cnanoaa.clinux自带的一个nano编辑器。cat在字符模式下打印文件的内容到屏幕读文件然后显示到屏幕逐行显示tacaa.c是逆序读取aa.c从尾至头显示文件head显示前十行tail显示文件后十行shift+p..
分类:
系统相关 时间:
2014-08-26 03:06:25
阅读次数:
345
postfix无法启动,查看日志,发现日志提示master.cf文件109行有问题,打开文件一看109行是注释啊,怎么回事?日志如下:tail-f/var/log/maillog
Aug1815:56:11localhostpostfix/postfix-script[11639]:startingthePostfixmailsystem
Aug1815:56:11localhostpostfix/master[1164..
分类:
其他好文 时间:
2014-08-26 03:02:16
阅读次数:
169
学习云风的skynet源码,简单记录下。
void
skynet_globalmq_push(struct message_queue * queue) {
struct global_queue *q= Q;
uint32_t tail = GP(__sync_fetch_and_add(&q->tail,1));
// only one thread can set the sl...
分类:
Web程序 时间:
2014-08-25 21:11:04
阅读次数:
499
1.for循环以及加法的使用portStr=`lsof -i:56801 | head -2`count=0for str in `lsof -i:56801 | head -2`do((count=count+1))echo "Count: $count"if [ $count == 11 ]; ...
分类:
系统相关 时间:
2014-08-25 18:59:14
阅读次数:
176
题目地址:HDU 1269
强连通分量裸题。。只要判断是否只有一个强连通分量就可以。
代码如下:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
int head[20000],...
分类:
其他好文 时间:
2014-08-25 17:08:54
阅读次数:
153
Linux2.4下驱动中定时器的应用我的内核是2.4.18的。Linux的内核中定义了一个定时器的结构:#includestruct timer_list{ struct list_head list;unsigned long expires; //定时器到期时间unsigned long dat...
分类:
系统相关 时间:
2014-08-25 16:51:24
阅读次数:
322
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After ...
分类:
其他好文 时间:
2014-08-24 19:13:32
阅读次数:
194
cat tail -f日 志 文 件 说 明/var/log/message 系统启动后的信息和错误日志,是Red Hat Linux中最常用的日志之一/var/log/secure 与安全相关的日志信息/var/log/maillog 与邮件相关的日志信息/var/log/cron 与定时任务相关...
分类:
系统相关 时间:
2014-08-24 16:34:42
阅读次数:
286
思路:递归执行,子函数需要返回子链表的head和tail,所以借助内部类NodePair来实现。/** * 4 / \ 2 5 / \ \ 1 3 6 / 0 0123456 * */public ...
分类:
其他好文 时间:
2014-08-24 12:51:12
阅读次数:
267
一、内核定时器定义:struct timer_list { struct list_head entry; unsigned long expires; void (*function)(unsigned long); unsigned long data; struc...
分类:
系统相关 时间:
2014-08-24 11:30:02
阅读次数:
241