
linux
文章平均质量分 84
三分球很准真的
dota是一种精神
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
linux服务器-客户端通信雏形
服务端程序,linux下编译通过 #include#include#include#include #define MAXLINE 100#define SA struct sockaddr#define SOCKET int using namespace std; int main(){ cout struct sockaddr_in server,client; SOCKET原创 2013-03-28 17:19:45 · 441 阅读 · 0 评论 -
CMake编译linux C++
CMake是一个跨平台的安装(编译)工具,可以用简单的语句来描述所有平台的安装(编译过程)。他能够输出各种各样的makefile或者project文件,能测试编译器所支持的C++特性,类似UNIX下的automake。只是 CMake 的组态档取名为 CmakeLists.txt。Cmake 并不直接建构出最终的软件,而是产生标准的建构档(如 Unix 的 Makefile 或 Windows V原创 2013-03-28 17:19:43 · 619 阅读 · 0 评论 -
[转载]linux下 open() write() read() close函数
linux文件操作函数 原文地址:linux下 open() write() read() close函数作者:月下小溪 1. open()函数 功能描述:用于打开或创建文件,在打开或创建文件时可以指定文件的属性及用户的权限等各种参数。 所需头文件:#include ,#include ,#include 函数原型:int open(const char *pathname,i原创 2013-03-28 17:19:20 · 490 阅读 · 0 评论 -
linux正则表达式简介
正则表达式的应用 正则表达式是用来处理字串的一种工具,和bash一样重要,是学习linux的人通二脉。举个例子:grep命令去你的~/.bashrc 文件中加入alias grep='grep --color=auto',这样你grep是高亮的。 例子1 查网卡信息dmesg | grep -n -A3 -B2 'eth' 例子2 查文件中的信息grep -n 'the' test.txt原创 2013-03-28 17:19:53 · 436 阅读 · 0 评论 -
[转载]Linux open函数简介
linux-file-open() 原文地址:Linux open函数简介作者:老徐 open 函数用于打开和创建文件。以下是 open 函数的简单描述 #include fcntl.h> int open(const char *pathname, int oflag, ... ); 返回值:成功则返回文件描述符,否则返回 -1原创 2013-03-28 17:19:18 · 514 阅读 · 0 评论 -
linux常用命令
查看 dmesg | grep -n -A3 -B2 'eth' #例子1 查网卡信息 ulimit -a 查看服务器配置信息 ulimit -c unlimited wc -l 行数 搜索 grep -n 'the' test.txt //从刚刚的文件当中取得 the 这个特定字串 grep -vn 'the' test.txt //当该行没有 'the' 这原创 2013-03-29 10:33:38 · 582 阅读 · 0 评论 -
多线程使用linux时间函数的方法
linux的时间函数有其特别需要注意的使用方法,在工程项目中,这点很容易忽视,本文就时间函数在多线程中的使用作一个小结。 首先看一个函数,取下一天的功能函数,该函数使用了时间函数localtime或者localtime_r来获取系统时间。int GetNextTime(int curtm){ struct tm t; t.tm_year = curtm/10000 - 1900; t.tm_mo原创 2013-03-28 17:21:18 · 897 阅读 · 0 评论 -
我的vim轻量级配置
syntax onset nu!set ai!set showmatch "设置括号匹配模式let mapleader = ",""set cursorcolumn "列显示set cmdheight=1set ts=4 "Tab为4个空格set sw=4set shiftwidth=4set backspace=2set lbr "单词间不能断行set shortmess=atI "启动不显示原创 2013-03-28 17:19:41 · 537 阅读 · 0 评论