易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux GCC make文件的写法2

文件在两个文件夹:
inc/hello.h
main/hello.c, main.c, Makefile
文件内容:
hello.h
void hello(char name[]);

hello.c
#include <stdio.h>
void hello(char name[])
{
printf("Hello %s!\n", name);
}

main.c
#include <stdio.h>
#include "../inc/hello.h"
// The second
int main()
{
hello("GCC");
printf("Haha Linux Ubuntu!\n");
return 0;
}
  
Makefile
# String declaration
objects = main.o hello.o
# Command
app : $(objects)
cc -o app $(objects)
main.o : main.c hello.h
cc -c main.c
hello.o : hello.c stdio.h
cc -c hello.c
# Search paths
vpath %.h /usr/include ../inc
# Clean the intermediate files
.PHONY : clean
clean :
rm app $(objects)


相关文档:

J2EE项目迁移(window >linux)

1. download & setup jdk
2. download eclipse and test a simple example of java
3. setup mysql use yum(or download & setup by hand)
 yum install mysql
 problem1:linux mysql configuration & use
  solution1:
   mysql -uroot -p
   passw ......

linux查找最近修改的文件 并只拿出文件名

在服务器上写部署项目的脚本 ,需要把上传来的最新的项目解压, 部署 ,启动服务 实现自动化
于是找到最新的文件是第一件事情
就得到了以下脚本
$ ls -lrt | awk '/xmhi/ { f=$NF };END{ print f }'
中间的xmhi是文件所包含的字符串
另外如果要ls出所有的文件名
$ ls -l |awk '{print$9}' ......

Linux软件安装与卸载

Linux下软件的安装与卸载
一、二进制分发软件包的安装与卸载
Linux软件的二进制分发是指事先已经编译好二进制形式的软件包的发布形式,其优点是安装使用容易,缺点则是缺乏灵活性,如果该软件包是为特定的硬件/操作系统平台编译的,那它就不能在另外的平台或环境下正确执行。
1、*.rpm形式的二进制软件包
安装:rpm ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号