- 博客(7)
- 资源 (9)
- 收藏
- 关注
原创 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 1086
原创 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 27638 1
原创 减少系统调用次数以提高系统效率
以文件拷贝为例: We’ll do this in a number of ways during this chapter to compare the efficiency of each method. For brevity, we’ll assume that the input file exists and the output file does not, and that all reads and writes succeed. Of course, in real-life p
2010-11-26 12:21:00 1526
原创 Linux 文件、文件夹默认权限
•若用户建立为”文件”则默认“没有可执行(x)项目”,即只有rw这两个项目,也就是最大为666分,默认属性如下: -rw-rw-rw- • 若用户建立为”目录”,则由于x与是否可以进入此目录有关,因此默认为所有权限均开放,即为777分,默认属性如下: drwxrwxrwx
2010-11-26 11:28:00 1561
原创 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 1309
原创 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 913
原创 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 559
Middlegen for Hibernate
2010-02-15
roboform 6.9.91 自动填表工具
2008-12-15
JSP+JavaBean做的一个简单的网上书店
2008-12-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人