NAME(名称)
access - 确定文件是否可以存取访问
SYNOPSIS(总览)
access -mode file
DESCRIPTION (描述)
如果 file 可以在特定模式下存取访问,那么成功退出. mode 为 rwx 中的一个或多个字符, 这里的 r 表示可读, w 表示可写,而 x 表示可执行.
access 和 test 之间的区别在于后者查看权限位,而前者使用 access(2) 系统调用进行检查.当文件系统以只读方式被挂载时,两者就有区别了.
OPTIONS(选项)
access 接受以下附加的选项:
- --help
- 打印帮助信息并退出.
- --version
- 打印版本信息并退出.
SEE ALSO(另见)
access(2)
#p#
NAME
access - determine whether a file can be accessed
SYNOPSIS
access -mode file
DESCRIPTION
Exit successfully if file can be accessed with the specified mode. mode is one or more letters of rwx, where r is for readable, w is for writable, and x is for executable.
The difference between access and test is that the latter looks at the permission bits, while the former checks using the access(2) system call. This makes a difference when file systems have been mounted read-only.
OPTIONS
access accepts the following additional options:
- --help
- Print help message and exit.
- --version
- Print version information and exit.
SEE ALSO
access(2)