📄 access.2
字号:
.TH ACCESS 2 .SH NAMEaccess \- determine accessibility of file.SH SYNOPSIS.B access(name, mode).br.B char *name;.SH DESCRIPTION.I Accesschecks the givenfile.I namefor accessibility according to.I mode,which is 4 (read), 2 (write) or 1 (execute) or a combination thereof.Specifying mode 0tests whether the directories leading to the file can besearched and the file exists..PPAn appropriate error indication is returned if .I namecannot be found or if anyof the desired access modes would not be granted.On disallowed accesses\-1 is returned and the error code is in.IR errno .0 is returned from successful tests..PPThe user and group IDs with respect to which permission is checkedare the real UID and GID of the process, so this call isuseful to set-UID programs..PPNotice that it is only access bits that are checked.A directory may be announced as writable by.I access,but an attempt to open it for writing will fail(although files may be created there);a file may look executable, but.I execwill fail unless it is in proper format..PP.SH SEE ALSOstat(2).SH ASSEMBLER(access = 33.).br.B sys access; name; mode
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -