
Linux
xinem
学习期间.....
展开
-
Linux 启动过程
1.load bios(hardware information)2.read MBRs config to find out the OS3.load the kernel of the OS4.init process starts..5.execute /etc/rc.d/sysinit( rc:run command ,d:表示精灵线程,指启动过程看不到的服务器进程)原创 2008-10-02 16:15:00 · 559 阅读 · 0 评论 -
Linux 文件操作库函数 – close
We use closeto terminate the association between a file descriptor, fildes, and its file. The file descriptor becomes available for reuse. It returns 0 if successful and -1 on error. #include int close(int fildes); Note that it can be import原创 2010-11-26 11:13:00 · 947 阅读 · 0 评论 -
Linux 文件操作库函数 -- ioctl
ioctl is a bit of a ragbag of things. It provides an interface for controlling the behavior of devices and their descriptors and configuring underlying services. Terminals, file descriptors, sockets, and even tape drives may have ioctlcalls defined for原创 2010-11-26 11:24:00 · 1329 阅读 · 0 评论 -
umask
The umask is a system variable that encodes a mask for file permissions to be used when a file is cre- ated. You can change the variable by executing the umask command to supply a new value. The value is a three-digit octal value. Each digit is the re原创 2010-11-26 11:06:00 · 583 阅读 · 0 评论 -
Linux系统库函数 -- lseek函数用法
所有打开的文件都有一个当前文件偏移量(current file offset),以下简称为 cfo。cfo 通常是一个非负整数,用于表明文件开始处到文件当前位置的字节数。读写操作通常开始于 cfo,并且使 cfo 增大,增量为读写的字节数。文件被打开时,cfo 会被初始化为 0,除非使用了 O_APPEND 。 使用 lseek 函数可以改变文件的 cfo 。 #include off_t lseek(int filedes, off_t offset,原创 2010-11-26 14:10:00 · 27794 阅读 · 1 评论 -
Stream Errors
To indicate an error, many stdiolibrary functions return out-of-range values, such as null pointers or the constant EOF. In these cases, the error is indicated in the external variable errno: #include extern int errno; Note that many function原创 2010-12-02 17:01:00 · 648 阅读 · 0 评论 -
Linux 系统库函数 -- dup 和 dup2
The dupsystem calls provide a way of duplicating a file descriptor, giving us two or more different descriptors that access the same file. These might be used for reading and writing to different locations in the file. The dupsystem call duplicates a f原创 2010-11-26 14:17:00 · 1123 阅读 · 0 评论