linux中rwx权限前的c和d都表示什么意思

很新手,没入门,求高手解答
2025-03-23 14:04:09
推荐回答(2个)
回答1:

rwx前一个字符对应文件类型:

-就是普通的文件,d表示是目录, c表示是字符设备(在linux/unix,所有的设备都是文件),b是块设备文件, s是socket文件,等等。下面给出所有文件类型标识:

`-'
regular file

`b'
block special file

`c'
character special file

`C'
high performance ("contiguous data") file

`d'
directory

`D'
door (Solaris 2.5 and up)

`l'
symbolic link

`M'
off-line ("migrated") file (Cray DMF)

`n'
network special file (HP-UX)

`p'
FIFO (named pipe)

`P'
port (Solaris 10 and up)

`s'
socket

`?'
some other file type

回答2:

d:目录
c:字符设备文件