
linux
victoryckl
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
修改Linux开机图片(小企鹅)
http://hi.baidu.com/leo_618/item/aba1dcd43e4bab90260ae7a5一、按照下面的方法创建开机图片 1、用PhotoShop或网上下载80x80的图片一张 2、使用GIMP工具转换成224色的ppm格式的图片 (1)打开要转换的图片 (2)依次选择图像->模式->索引,在最大颜色数量选择224 (3)选择文件->另存为名称填转载 2012-10-26 16:07:32 · 1585 阅读 · 0 评论 -
创建硬链接:Invalid cross-device link错误
http://www.cppblog.com/mingjiagu/archive/2011/12/01/161271.htmltest243:~ # ln -d /usr/local/named/etc/named.conf /etc/named.confln: creating hard link ' /etc/............. /etc/named.conf' :Invali转载 2012-11-23 00:04:35 · 24187 阅读 · 0 评论 -
第 34 章 终端、作业控制与守护进程
http://learn.akae.cn/media/ch34s01.html1. 终端 请点评1.1. 终端的基本概念 请点评在UNIX系统中,用户通过终端登录系统后得到一个Shell进程,这个终端成为Shell进程的控制终端(Controlling Terminal),在第 1 节 “引言”讲过,控制终端是保存在PCB中的信息,而我们知道fork会复制P转载 2012-12-30 21:38:08 · 874 阅读 · 0 评论 -
Linux C编程一站式学习
http://learn.akae.cn/media/index.html宋劲杉北京亚嵌教育研究中心songjinshan AT akaedu DOT org>版权 © 2008, 2009 宋劲杉, 北京亚嵌教育研究中心本书前两部分已整理出版,详见http://www.china-pub.com/196188,http://www.doub转载 2012-12-30 21:39:53 · 787 阅读 · 0 评论 -
浅析terminal创建时ptmx和pts关系
http://blog.csdn.net/unbutun/article/details/7930773我们打开一个terminal,那么将会在devpts文件系统/dev/pts下创建一个对应的pts字符文件,该pts字符文件节点直接由/dev/ptmx节点的驱动函数ptmx_open()调用devpts_pty_new(tty->link)[tty对应ptmx,tty->lin转载 2012-12-30 21:46:36 · 1213 阅读 · 0 评论 -
linux下获取所有文件夹和文件,支持nfs和xfs(C++实现)
http://www.oschina.net/code/snippet_203297_9027.要获取一个指定目录下的文件或文件夹,在linux下一般用dirent来做。dirent结构体中d_type表示类型,4表示目录,8表示普通文件,0表示未知设备。一般的文件系统直接用d_type判断,不会出现问题。由于项目中用到了nfs,实际的文件存放在另一台机器上,通过nfs映射到当年机器上。读文件转载 2013-02-02 18:49:49 · 1737 阅读 · 0 评论 -
linux stat函数讲解
http://www.cnblogs.com/hnrainll/archive/2011/05/11/2043361.html表头文件: #include #include 定义函数: int stat(const char *file_name, struct stat *buf);函数说明: 通过文件名filename获取文件信息,并保存在buf所指的结构体stat中返转载 2013-02-02 18:56:42 · 595 阅读 · 0 评论 -
[linux]全面剖析Linux库文件路径的添加
/etc/ld.so.conf中只有一行文本,如下:include /etc/ld.so.conf.d/*.conf查看/etc/ld.so.conf.d/:root@ckl-ubuntu-11:/etc/ld.so.conf.d# lsbiarch-compat.conf i686-linux-gnu.conf vmware-tools-libraries.conf转载 2013-03-03 23:35:44 · 1278 阅读 · 0 评论 -
Linux 技巧: Bash 参数和参数扩展
http://www.ibm.com/developerworks/cn/linux/l-bash-parameters.html 现在,很多 Linux® 和 UNIX® 系统上都有 bash shell,它是 Linux 上常见的默认 shell。通过本文,您将了解到如何在 bash 脚本中处理参数和选项,以及如何使用 shell 的参数扩展检查或修改参数。本文重点介绍 bash,文中转载 2013-07-27 15:30:49 · 997 阅读 · 0 评论 -
tmpfs
http://baike.baidu.com/link?url=ZKNJ8SqJwFT10OXg6M2xCv8aJSLp3ZjPgeGu3wwZHHJvlkWDfl7S2l9Ld1LgiZhhSEunGyzoYe61CDfCTJkRAq tmpfs百科名片tmpfs是一种基于内存的文件系统,它和虚拟磁盘ramdisk比较类似像,但不完全相同,和ramdisk一样转载 2013-08-26 16:14:53 · 1946 阅读 · 0 评论 -
fork()、pipe()、dup2() 和 execlp() 的组合技法
pipe(),父子进程之间通讯工具。pipe有读写两端,用int表搜索示。0-read, 1-write.一端进程将数据写入write内,另一进程由read段读出。使用参数为一个int数组,共两个元素,用以表示读写两端的状态。close(),用于关闭清空pipe某端,参数为表示pipe端口数组二元素之一。dup2(),用于redirection, 将pipe某端与标准i/o相连,即转载 2013-12-15 17:16:50 · 5221 阅读 · 0 评论 -
每个Linux用户都应该了解的命令行省时技巧
http://blog.jobbole.com/54425/本文由 伯乐在线 - 高磊 翻译自 Joshua Levy。欢迎加入技术翻译小组。转载请参见文章末尾处的要求。伯乐在线导读:有网友在问答网站Quora上提问:“有哪些省时小技巧,是每个Linux用户都应该知道的?” Joshua Levy 平常就在 Linux 平台工作,并且他积累了不少实用命令行技巧,转载 2014-01-08 13:46:32 · 856 阅读 · 0 评论 -
网络端口查看命令
tcpdumphttp://www.cnblogs.com/ggjucheng/archive/2012/01/14/2322659.htmlnetstat -nahttp://www.cnblogs.com/ggjucheng/archive/2012/01/08/2316661.htmllsof------------------http://w转载 2014-01-19 15:06:20 · 12861 阅读 · 0 评论 -
Linux驱动Makefile 模板
http://blog.csdn.net/shijian408/article/details/7253471PC机上的: 1.obj-m := hello.o 2.KERNELDIR := /lib/modules/$(shell uname -r)/build 3.default: 4. make -C $(KERNELDIR) M=$(转载 2012-10-14 00:14:43 · 586 阅读 · 0 评论 -
linux2.6驱动makefile的编写和驱动编写快速参考
http://hi.baidu.com/wsdxs1234/item/5362c675ee32e1235d178943我用的makefile## Makefile for the led driver#ifneq ($(KERNELRELEASE),)obj-m := led.oelseexport ARCH=arm# 这里要写上arm交转载 2012-10-14 00:07:34 · 967 阅读 · 0 评论 -
linux dd命令参数及用法详解---用指定大小的块拷贝一个文件
http://www.linuxso.com/command/dd.htmldd 的主要选项:指定数字的地方若以下列字符结尾乘以相应的数字:b=512, c=1, k=1024, w=2, xm=number mif=file输入文件名,缺省为标准输入。of=file输出文件名,缺省为标准输出。ibs=bytes一转载 2012-01-10 21:28:19 · 832 阅读 · 0 评论 -
C程序调用shell脚本共有三种方法
http://www.cnblogs.com/no7dw/archive/2011/01/22/1941858.htmlC程序调用shell脚本共有三种法子 :system()、popen()、exec系列函数call_exec1.c ,内容为:system() 不用你自己去产生进程,它已经封装了,直接加入自己的命令exec 需要你自己 fork 进程,然后exec 自己的命令转载 2012-02-02 21:48:22 · 1599 阅读 · 1 评论 -
windows下生成libiconv静态lib
http://blog.csdn.net/ww2000e/article/details/6534168libiconv新版已经不支持nmake来编译了,只能用cygwin之类的环境,编出来的是.dll.la之类的库,好像有方法生成.lib,没细看。网上找了个windows版的,libiconv for windows:http://gnuwin32.sourceforge转载 2011-12-30 00:10:37 · 1630 阅读 · 0 评论 -
iconv使用
http://baike.baidu.com/view/1437030.htm头文件"inconv.h"。iconv命令可以将一种已知的字符集文件转换成另一种已知的字符集文件。它的作用是在多种国际编码格式之间进行文本内码的转换。作为编程接口的iconv包括3个函数: iconv_open函数用于初始化用于转换的内部缓冲区,需要指明需要从何种编码方式转换转载 2011-12-30 00:26:02 · 2886 阅读 · 0 评论 -
fstatfs/statfs详解
http://blog.csdn.net/hbuxiaoshe/article/details/6561914 【fstatfs/statfs系统调用】 功能描述: 查询文件系统相关的信息。 用法: #include /* 或者 */ int statfs(const char *path, struct statf转载 2012-02-09 14:41:39 · 1018 阅读 · 0 评论 -
实例讲解C语言OPEN函数语法及其应用
http://www.soft6.com/v9/2009/jckf_0407/98998.html open是一个非标准的低级文件I/O函数,返回的是文件的低级句柄,原型: int open(char* path, int access, ……); open是一个可变参数的函数实现,后面的可变参数通常表示unsigned mode,mode参数是否存在要看转载 2012-02-19 00:06:16 · 1301 阅读 · 0 评论 -
shell基础 (输入参数、分支、循环)
http://blog.chinaunix.net/space.php?uid=20388009&do=blog&id=19527771、脚本如何接受参数-$序号代表相应的参数。如kk me t ,其中kk未脚本名字,me ,t都是传递给脚本的参数,在脚本里面用$1代表me,$2就代表t。非常简单。留意一下$(10),$(11),即是10之后就需要用()括起来。$ sh_pro转载 2012-04-21 22:58:50 · 1176 阅读 · 0 评论 -
SHELL参数介绍
http://hi.baidu.com/jackli00/blog/item/79c845c7fcd5d11c9d163d0e.html如同ls 命令可以接受目录等作为它的参数一样,在shell编程时同样可以使用参数。Shell有位置参数和内部参数。1、 位置参数由系统提供的参数称为位置参数。位置参数的值可以用$N得到,N是一个数字,如果为1,即$1.类似C语言中的数组,L转载 2012-04-21 22:56:33 · 517 阅读 · 0 评论 -
解决waiting for jockey-backend to exit
http://blog.csdn.net/nicaiwa/article/details/6770571解决方法:终端输入:ps -e | grep jockey得到jockey的id然后:sudo kill “id”在虚拟机中的ubuntu 12启动共享文件,安装samba服务等组件时,停止在waiting for jockey-backend转载 2012-05-21 23:24:23 · 1201 阅读 · 0 评论 -
Linux su 几点建议
http://hi.baidu.com/thinkzero/item/172bc360171f6f1d7ddeccda首先我们看su在man 帮助页中的解释su - run a shell with substitute userand group IDs ,也就是说通过su我们不用提供用户和组名就可以启动一个shell程序。 su 是一个二进制的可执行文件,命令所在的文件路径是/bin/su转载 2012-08-29 17:55:04 · 933 阅读 · 0 评论 -
find -exec -ok 的用法 -mtime
http://zhumeng8337797.blog.163.com/blog/static/1007689142011012516171/-exec: find命令对匹配的文件执行该参数所给出的s h e l l命令。相应命令的形式为' command' {} \;,注意{ }和\;之间的空格。-ok: 和- e x e c的作用相同,只不过以一种更为安全的模式来执行该转载 2012-09-06 07:27:11 · 2870 阅读 · 0 评论 -
查看ubuntu版本号
http://www.cnblogs.com/zero1665/archive/2010/05/24/1742962.html方法一:cat /etc/issue返回结果:Ubuntu 6.06.2 LTS \n \l方法二:sudo lsb_release -a 返回结果:No LSB modules are availabl转载 2012-10-13 17:43:16 · 661 阅读 · 0 评论 -
linux驱动开发环境的搭建 转一下别的大虾的经验
http://blog.csdn.net/lishaman/article/details/6143325linux驱动开发环境的搭建学习写Linux驱动两周多了,但是一周的时间都在第一个驱动程序上止步不前,damn it,Hello,World!!!总是编译不了。网上找了很多人的方法。都不行。终于一天make通过了,生成了.ko文件,但是insmod的时候又有别的问题转载 2012-10-13 18:36:29 · 953 阅读 · 0 评论 -
Linux Socket编程
http://www.cnblogs.com/skynet/archive/2010/12/12/1903949.html“一切皆Socket!”话虽些许夸张,但是事实也是,现在的网络编程几乎都是用的socket。——有感于实际编程和开源项目研究。我们深谙信息交流的价值,那网络中进程之间如何通信,如我们每天打开浏览器浏览网页时,浏览器的进程怎么与web服务器通信的?当你转载 2014-01-19 16:32:24 · 739 阅读 · 0 评论