【发布时间】:2015-08-26 09:24:50
【问题描述】:
在 unix 中打开系统调用
以下是开放系统调用的原型:
int open(const char *pathname, int flags);
int open(const char *pathname, int flags, mode_t mode);
pathname --> 用于提及/home/mohan/a.txt等文件的路径
flags --> 用于指明文件将以何种模式打开,如只读、只写或读写。
模式 --> ?
什么是模式以及我何时使用该模式。有没有使用模式的例子。
提前致谢。
【问题讨论】:
-
你可能想检查这个问题Using the open system call
-
阅读文档怎么样?在终端中键入
man open。否则,请在您最喜欢的互联网搜索引擎中输入man open。