![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux学习
文章平均质量分 80
wujinfa
这个作者很懒,什么都没留下…
展开
-
gcc
原型:gcc [选项] [文件名]参数说明:-o 指定可执行文件名,默认为a.out gcc helloworld.c -o hello-c 编译但不链接 gcc -c helloworld.c -o hello-g 产生调试信息,用于gdb调试 gcc -g helloworld.c -o hello-O 优化编译及链接,加入此选项可以提高程序运行效率,但编译速度原创 2012-05-05 18:42:49 · 167 阅读 · 0 评论 -
gdb常用命令解析
1、使用gdb的前提是gcc里加入-g选项2、启动gdb有两种方法: gdb 程序名 或: gdb file 程序名3、gdb常用命令 list(l):查看代码,想继续查看可重复list break(b) 函数名:在指定函数入口处打断点 break(b) 行号:在文件指定行加入断点 break(b) 文件名:行号:在指定文件的指定行号处原创 2012-05-05 20:10:11 · 143 阅读 · 0 评论 -
linux Find命令
首先是find的语法:find [起始目录] 寻找条件 操作还有种表述方式:find PATH OPTION [-exec COMMAND { } \;]因为find命令会根据我们给的option,也就是寻找条件从我们给出的目录开始对其中文件及其下子目录中的文件进行递归搜索,所以我觉的这个地方说是“起始目录”是非常好的。该命令中的寻找条件可以是一个用逻辑运算符 not、and、or转载 2012-05-05 21:45:12 · 138 阅读 · 0 评论 -
makefile入门
makefile用于编写编译链接的规则。makefile术语:规则:用于说明如何生成一个或多个目标文件,格式如下: 目标:依赖 命令 hello:hello.c gcc hello.c -o hello 这里hello是目标,是要生成的文件。hello.c是依赖,是生成目标所需要的文件。gcc hello.c -o he原创 2012-05-05 21:01:31 · 161 阅读 · 0 评论 -
linux 时间编程
一、时间类型介绍 1、UTC(Coordinated Universal Time):世界标准时间,也就是格林威治时间(GMT) 2、CT(Calendar Time):日历时间,从某个时间点开始到现在经过的秒数二、头文件 #include 三、函数介绍: 1、时间获取 time_t time(time_t *tloc);//获取日历时间,即从1970年1月1原创 2012-05-12 10:55:06 · 232 阅读 · 0 评论 -
Ubuntu下编译x86 linux
1、下载kernel,地址:http://www.kernel.org/我这里下的是linux-2.6.32.59 2、解压: #tar -xvf linux-2.6.32.59.tar.bz2 3、清理内核中间文件,及配置文件 #cdlinux-2.6.32.59 #makedistclean(备注:make原创 2012-07-11 14:36:02 · 304 阅读 · 0 评论 -
ubuntu下安装tftp
1、安装相关软件包apt-get install tftpd (服务端)apt-get install tftp (客户端) apt-get install xinetd 2、建立配置文件cd /etc/xinetd.d/vi tftp输入service tftp{ socket_type转载 2012-09-17 10:43:19 · 163 阅读 · 0 评论 -
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.解决方法
最近编译GCC的时候.遇到这个问题:configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+. Try the --with-gmp and/or --with-mpfr options to specify their locations. Copies of these libraries' source原创 2012-12-07 10:17:48 · 2450 阅读 · 0 评论