- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 工作中用到的shell命令或脚本收集
1. 批量杀死test进程 ps -A | awk /test/ {print $1} | xargs kill -9解释:ps -A 列出所有进程awk 匹配有test字符的行并打印第一列 即进程号xargs 得到标准输出,作为kill杀死的进程号
2007-06-22 10:48:00 622
原创 c 语言小的程序
1. 随机数: #include #includeint main(int argc,char *argv[]){ srand((unsigned)time( NULL )); int k = rand()%26; return 0;}如果没有没有srand更新随机种子,每次的执行总是一样的,现在去当前时间之后,每次的执行就不一样了。2.分离字符串: #include
2007-06-07 17:34:00 528
转载 linux c 多线程
pthread_t 在头文件/usr/include/bits/pthreadtypes.h中定义:typedef unsigned long int pthread_t;extern int pthread_create __P ((pthread_t *__thread, __const pthread_attr_t *__attr, void *(*__start_routine) (vo
2007-06-05 20:26:00 1109
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人