ACCESS 中文man頁(yè)面
NAME(名稱)
access - 確定文件是否可以存取訪問(wèn)
SYNOPSIS(總覽)
access -mode file
DESCRIPTION (描述)
如果 file 可以在特定模式下存取訪問(wèn),那么成功退出. mode 為 rwx 中的一個(gè)或多個(gè)字符, 這里的 r 表示可讀, w 表示可寫(xiě),而 x 表示可執(zhí)行.
access 和 test 之間的區(qū)別在于后者查看權(quán)限位,而前者使用 access(2) 系統(tǒng)調(diào)用進(jìn)行檢查.當(dāng)文件系統(tǒng)以只讀方式被掛載時(shí),兩者就有區(qū)別了.
OPTIONS(選項(xiàng))
access 接受以下附加的選項(xiàng):
- --help
- 打印幫助信息并退出.
- --version
- 打印版本信息并退出.
SEE ALSO(另見(jiàn))
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)