【问题标题】:Linux File TypeLinux 文件类型
【发布时间】:2014-08-03 12:58:13
【问题描述】:

我可以使用“cd/Volumes”访问所有已安装的卷,并使用“ls -l”命令。 这列出了:

lrwxr-xr-x  1 root          admin      1 Aug  3 20:05 Macintosh HD -> /
drwxrwxrwx@ 1 username  staff  16384 Aug  2 16:33 Untitled
-rwxr-xr-x  1 username  admin      0 Jan 23  2014 bin

我只是想知道为什么我的 USB 驱动器的文件类型是“d”。我认为它应该是“b”或“c”。 我的 USB 驱动程序的名称是无标题。 我正在使用mac学习linux。 任何帮助或链接表示赞赏。

谢谢,

【问题讨论】:

  • 为什么你认为应该是bcd是directory的缩写,文件系统在Unix/Linux世界中作为目录挂载
  • 我认为“b”或“c”将用于连接mac的某些硬件。我只是很困惑......那么“b”或“c”是用来做什么的?如果我连接我的打印机,它应该是“b”还是“c”?

标签: linux file directory


【解决方案1】:

来自ls invocation - What information is listed

The file type is one of the following characters: 

‘-’
    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 v

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-08-02
    • 2013-01-12
    • 1970-01-01
    • 1970-01-01
    • 2010-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多