程序自启动脚本实质上就是一个shell脚本。以简单的Tomcat自启动脚本为例,Tomcat使用安装目录下的startup.sh启动、shutdown.sh停止,我们可以把它们写到一个启动脚本里。1.建立自启动脚本:vim /etc/init.d/tomcat输入如下内容: 1 #!/bin/bas...
分类:
系统相关 时间:
2014-12-31 18:09:34
阅读次数:
173
标准I/O函数库提供了popen函数,它启动另外一个进程去执行一个shell命令行。这里我们称调用popen的进程为父进程,由popen启动的进程称为子进程。popen函数还创建一个管道用于父子进程间通信。父进程要么从管道读信息,要么向管道写信息,至于是读还是写取决于父进程调用popen时传递的参数...
分类:
其他好文 时间:
2014-12-31 16:06:27
阅读次数:
225
由于ios中没有 cocoa的NSTask 所以要在cocoa touch SDK中执行shell 只能用系统调用int system(const char * string);例如:system("ls");注意system是系统C函数 所以参数不要使用NSString;函数库:includesy...
分类:
移动开发 时间:
2014-12-31 15:56:43
阅读次数:
154
六. 常见编译错误 在新安装的Ubuntu系统下,第一次编译Android源码问题很多。以下都是在执行make命令后,编译过程中出现的问题。 原则是make遇到缺什么就安装什么,通过Google+ Baidu 搜索报错。错误:/bin/bash: build/core/find-jdk-tools....
分类:
移动开发 时间:
2014-12-31 15:52:56
阅读次数:
273
1.打开终端,输入help命令可以查看系统默认的shell(通常是bash)的内置的shell命令列表:[tansheng@localhost ~]$ helpGNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)These shel...
分类:
系统相关 时间:
2014-12-31 14:25:43
阅读次数:
246
1.bash shell是大多数linux发行版本的默认shell命令解释器,但是最近爆出bash shell存在漏洞。2.如果Bash是默认的系统shell,网络攻击者可以通过发送Web请求、secure shell、telnet会话或其它使用Bash执行脚本的程序攻击服务器和其它Unix和Lin...
分类:
系统相关 时间:
2014-12-31 14:14:37
阅读次数:
422
为了避免汉澳sinox2013受到bash漏洞攻击,现提供sinox2013x86操作系统的漏洞修复包下载安装。
请用户马上下载安装。
sinox2013安装包是bashx86-4.2.20.tbz
可以这样安装
pkg_add -f ftp://sinox.org/bashx86-4.2.20.tbz
如果半天没反应,可以执行
wget ftp://sinox.org/bas...
分类:
系统相关 时间:
2014-12-31 13:04:08
阅读次数:
307
1.命令cat /etc/shells[tansheng@localhost ~]$ cat /etc/shells/bin/sh/bin/bash/sbin/nologin/bin/dash/bin/tcsh/bin/csh[tansheng@localhost ~]$ 2./bin/sh是最原始...
分类:
系统相关 时间:
2014-12-31 13:04:05
阅读次数:
285
xmllint是一个很方便的处理及验证xml的工具,linux下要安装libxml2才能使用这个命令。但是 xmllint -format filename 格式化输出是在标准输出,而不是文件本身。(不能简单的使用重定向)所以我写了个bash 函数,放在 /etc/bashrc里function x...
分类:
其他好文 时间:
2014-12-31 12:57:15
阅读次数:
216
安装lemp:#!/bin/bash
root=/opt/app
if[$(id-u)!="0"];then
echo"Error:Youmustberoottorunthisscript,pleaseuseroottoinstalllnmp"
exit1
fi
rpm-ephpphp-commanmysqlmysql-server
yuminstall-ygccgcc-c++openssl-develzlib-devellibXpm-devellibxml2libxml2-develcurl-de..
分类:
其他好文 时间:
2014-12-31 11:32:05
阅读次数:
198