linux 中注意事项
(1)exit()与_exit()区别: _exit()直接使进程停止运行,清除器使用的内存空间,销毁其在内核中的各种数据结构。
exit()函数在调用exit系统调用之前要检查文件的打开情况,把文件缓冲区中的内容写回文件,清理I/O缓冲(推荐使用这个函数)
(2)waitpid
#include <sys/types.h>
#include <sys/wait.h>
pid_t waitpid( pid_t pid, int *status, int options );
其中:pid取值不同,意义不同:
pid > 0时, 只等待进程ID=pid的子进程,不管其他已经有多少子进程运行结束推出了,只要指定的子进程还没有结束,waitpid就会一直等下去;
pid = -1时, 等待任何一个子进程退出,没有任何限制,此时waitpid 和wait的作用一摸一样;
pid = 0 时, 等待同一进程组中的任何子进程,如果子进程已经加入了别的进程组,waitpid不会对它做任何理睬;
pid < -1时, 等待一个指定进程组中的任何子进程,这个进程组的ID等于pid的绝对值
相关文档:
linux中,在支持多线程的环境中,通常每个线程都有属于自己的errno变量,是用来表示特定错误的常量。
以下是<errno.h>中定义的所有出错errno常量
#define EPERM 1 /* Operation not permitted */
#define ENOEN ......
就是在已有的数据库实例上创建一个新的帐号,访问一些新的表
操作步骤如下:
1、登录linux,以oracle用户登录(如果是root用户登录的,登录后用 su - oracle命令切换成oracle用户)
2、以sysdba方式来打开sqlplus,命令如下: sqlplus "/as sysdba"
3、查看我们常规将用户表空间放置位置 ......
Name
hosts - The static table lookup for host names
Synopsis
/etc/hosts
Description
This manual page describes the format of the /etc/hosts
file. This file is a simple text file that
associates IP addresses with hostnames, one line per IP address. For
each host a single line should be presen ......
shell语法(五项)
1.命令格式
2.通配符
3.重定向
4.管道
5.shell中的引用
6.自动补齐命令行
系统管理维护
ls
pwd
cd
date
passwd
su
clear
man
who
w
uname
uptime
last
dmesg
free
ps
top
文件管理编辑
mkdir
more
cat
diff
grep
rm
touch
ln
file
cp
find
split
mv
压缩解压
zi ......
Ubuntu 7.10
在安装时,没有设置root密码,所以这就必须在安装完成后设置 命令如下:
$ sudo passwd root
输入你希望的root用户的密码
其它命令:
一、安装Grub
$ grub
$ find /boot/grub/stage1
(hd0,*)
$ root (hd0,*)
$ setup (hd0,*)
$ quit
$ sudo dd if=/de ......