ls -l列出linux的文件类型,常用的文件类型有:

[root@openstack dev]# ls -l总用量 0crw-rw----. 1 root video    10, 175 11月 16 22:03 agpgartcrw-------. 1 root root     10, 235 11月 16 22:03 autofsdrwxr-xr-x. 2 root root         180 11月 16 22:02 blockdrwxr-xr-x. 2 root root          80 11月 16 22:02 bsgcrw-------. 1 root root     10, 234 11月 16 22:02 btrfs-controldrwxr-xr-x. 3 root root          60 11月 16 22:02 buslrwxrwxrwx. 1 root root           3 11月 16 22:03 cdrom -> sr0drwxr-xr-x. 2 root root          80 11月 16 22:02 centos_openstackdrwxr-xr-x. 2 root root        2920 11月 16 22:03 charcrw-------. 1 root root      5,   1 11月 16 22:03 consolelrwxrwxrwx. 1 root root          11 11月 16 22:02 core -> /proc/kcoredrwxr-xr-x. 4 root root         100 11月 16 22:02 cpucrw-------. 1 root root     10,  61 11月 16 22:03 cpu_dma_latencycrw-------. 1 root root     10,  62 11月 16 22:03 crashdrwxr-xr-x. 5 root root         100 11月 16 22:02 diskbrw-rw----. 1 root disk    253,   0 11月 16 22:03 dm-0brw-rw----. 1 root disk    253,   1 11月 16 22:03 dm-1drwxr-xr-x. 2 root root          80 11月 16 22:02 dricrw-rw----. 1 root video    29,   0 11月 16 22:03 fb0lrwxrwxrwx. 1 root root          13 11月 16 22:02 fd -> /proc/self/fdbrw-rw----. 1 root disk      2,   0 11月 16 22:03 fd0crw-rw-rw-. 1 root root      1,   7 11月 16 22:03 fullcrw-rw-rw-. 1 root root     10, 229 11月 16 22:02 fusecrw-------. 1 root root    248,   0 11月 16 22:03 hidraw0crw-------. 1 root root     10, 228 11月 16 22:03 hpetdrwxr-xr-x. 2 root root           0 11月 16 22:02 hugepagescrw-------. 1 root root     10, 183 11月 16 22:03 hwrnglrwxrwxrwx. 1 root root          25 11月 16 22:02 initctl -> /run/systemd/initctl/fifodrwxr-xr-x. 4 root root         300 11月 16 22:03 inputcrw-r--r--. 1 root root      1,  11 11月 16 22:03 kmsgsrw-rw-rw-. 1 root root           0 11月 16 22:02 logcrw-rw----. 1 root disk     10, 237 11月 16 22:02 loop-controldrwxr-xr-x. 2 root root         100 11月 16 22:02 mappercrw-------. 1 root root     10, 227 11月 16 22:03 mcelogcrw-r-----. 1 root kmem      1,   1 11月 16 22:03 memdrwxrwxrwt. 2 root root          40 11月 16 22:02 mqueuedrwxr-xr-x. 2 root root          60 11月 16 22:02 netcrw-------. 1 root root     10,  60 11月 16 22:03 network_latencycrw-------. 1 root root     10,  59 11月 16 22:03 network_throughputcrw-rw-rw-. 1 root root      1,   3 11月 16 22:03 nullcrw-------. 1 root root     10, 144 11月 16 22:03 nvramcrw-------. 1 root root      1,  12 11月 16 22:03 oldmemcrw-r-----. 1 root kmem      1,   4 11月 16 22:03 portcrw-------. 1 root root    108,   0 11月 16 22:02 pppcrw-rw-rw-. 1 root tty       5,   2 11月 16 22:34 ptmxdrwxr-xr-x. 2 root root           0 11月 16 22:02 ptscrw-rw-rw-. 1 root root      1,   8 11月 16 22:03 randomdrwxr-xr-x. 2 root root          60 11月 16 22:02 rawcrw-rw-r--. 1 root root     10,  57 11月 16 22:03 rfkilllrwxrwxrwx. 1 root root           4 11月 16 22:03 rtc -> rtc0crw-------. 1 root root    253,   0 11月 16 22:03 rtc0brw-rw----. 1 root disk      8,   0 11月 16 22:03 sdabrw-rw----. 1 root disk      8,   1 11月 16 22:03 sda1brw-rw----. 1 root disk      8,   2 11月 16 22:03 sda2crw-rw----. 1 root cdrom    21,   0 11月 16 22:03 sg0crw-rw----. 1 root disk     21,   1 11月 16 22:03 sg1drwxrwxrwt. 2 root root          40 11月 16 22:02 shmcrw-------. 1 root root     10, 231 11月 16 22:03 snapshotdrwxr-xr-x. 2 root root          80 11月 16 22:02 sndbrw-rw----. 1 root cdrom    11,   0 11月 16 22:03 sr0lrwxrwxrwx. 1 root root          15 11月 16 22:02 stderr -> /proc/self/fd/2lrwxrwxrwx. 1 root root          15 11月 16 22:02 stdin -> /proc/self/fd/0lrwxrwxrwx. 1 root root          15 11月 16 22:02 stdout -> /proc/self/fd/1crw-rw-rw-. 1 root tty       5,   0 11月 16 22:03 ttycrw--w----. 1 root tty       4,   0 11月 16 22:03 tty0crw--w----. 1 root tty       4,   1 11月 16 22:03 tty1crw--w----. 1 root tty       4,  10 11月 16 22:03 tty10crw--w----. 1 root tty       4,  11 11月 16 22:03 tty11crw--w----. 1 root tty       4,  12 11月 16 22:03 tty12crw--w----. 1 root tty       4,  13 11月 16 22:03 tty13crw--w----. 1 root tty       4,  14 11月 16 22:03 tty14crw--w----. 1 root tty       4,  15 11月 16 22:03 tty15crw--w----. 1 root tty       4,  16 11月 16 22:03 tty16crw--w----. 1 root tty       4,  17 11月 16 22:03 tty17crw--w----. 1 root tty       4,  18 11月 16 22:03 tty18crw--w----. 1 root tty       4,  19 11月 16 22:03 tty19crw--w----. 1 root tty       4,   2 11月 16 22:03 tty2crw--w----. 1 root tty       4,  20 11月 16 22:03 tty20crw--w----. 1 root tty       4,  21 11月 16 22:03 tty21crw--w----. 1 root tty       4,  22 11月 16 22:03 tty22crw--w----. 1 root tty       4,  23 11月 16 22:03 tty23crw--w----. 1 root tty       4,  24 11月 16 22:03 tty24crw--w----. 1 root tty       4,  25 11月 16 22:03 tty25crw--w----. 1 root tty       4,  26 11月 16 22:03 tty26crw--w----. 1 root tty       4,  27 11月 16 22:03 tty27crw--w----. 1 root tty       4,  28 11月 16 22:03 tty28crw--w----. 1 root tty       4,  29 11月 16 22:03 tty29crw--w----. 1 root tty       4,   3 11月 16 22:03 tty3crw--w----. 1 root tty       4,  30 11月 16 22:03 tty30crw--w----. 1 root tty       4,  31 11月 16 22:03 tty31crw--w----. 1 root tty       4,  32 11月 16 22:03 tty32crw--w----. 1 root tty       4,  33 11月 16 22:03 tty33crw--w----. 1 root tty       4,  34 11月 16 22:03 tty34crw--w----. 1 root tty       4,  35 11月 16 22:03 tty35crw--w----. 1 root tty       4,  36 11月 16 22:03 tty36crw--w----. 1 root tty       4,  37 11月 16 22:03 tty37crw--w----. 1 root tty       4,  38 11月 16 22:03 tty38crw--w----. 1 root tty       4,  39 11月 16 22:03 tty39crw--w----. 1 root tty       4,   4 11月 16 22:03 tty4crw--w----. 1 root tty       4,  40 11月 16 22:03 tty40crw--w----. 1 root tty       4,  41 11月 16 22:03 tty41crw--w----. 1 root tty       4,  42 11月 16 22:03 tty42crw--w----. 1 root tty       4,  43 11月 16 22:03 tty43crw--w----. 1 root tty       4,  44 11月 16 22:03 tty44crw--w----. 1 root tty       4,  45 11月 16 22:03 tty45crw--w----. 1 root tty       4,  46 11月 16 22:03 tty46crw--w----. 1 root tty       4,  47 11月 16 22:03 tty47crw--w----. 1 root tty       4,  48 11月 16 22:03 tty48crw--w----. 1 root tty       4,  49 11月 16 22:03 tty49crw--w----. 1 root tty       4,   5 11月 16 22:03 tty5crw--w----. 1 root tty       4,  50 11月 16 22:03 tty50crw--w----. 1 root tty       4,  51 11月 16 22:03 tty51crw--w----. 1 root tty       4,  52 11月 16 22:03 tty52crw--w----. 1 root tty       4,  53 11月 16 22:03 tty53crw--w----. 1 root tty       4,  54 11月 16 22:03 tty54crw--w----. 1 root tty       4,  55 11月 16 22:03 tty55crw--w----. 1 root tty       4,  56 11月 16 22:03 tty56crw--w----. 1 root tty       4,  57 11月 16 22:03 tty57crw--w----. 1 root tty       4,  58 11月 16 22:03 tty58crw--w----. 1 root tty       4,  59 11月 16 22:03 tty59crw--w----. 1 root tty       4,   6 11月 16 22:03 tty6crw--w----. 1 root tty       4,  60 11月 16 22:03 tty60crw--w----. 1 root tty       4,  61 11月 16 22:03 tty61crw--w----. 1 root tty       4,  62 11月 16 22:03 tty62crw--w----. 1 root tty       4,  63 11月 16 22:03 tty63crw--w----. 1 root tty       4,   7 11月 16 22:03 tty7crw--w----. 1 root tty       4,   8 11月 16 22:03 tty8crw--w----. 1 root tty       4,   9 11月 16 22:03 tty9crw-rw----. 1 root dialout   4,  64 11月 16 22:03 ttyS0crw-rw----. 1 root dialout   4,  65 11月 16 22:03 ttyS1crw-rw----. 1 root dialout   4,  66 11月 16 22:03 ttyS2crw-rw----. 1 root dialout   4,  67 11月 16 22:03 ttyS3crw-------. 1 root root     10, 239 11月 16 22:02 uhidcrw-------. 1 root root     10, 223 11月 16 22:02 uinputcrw-rw-rw-. 1 root root      1,   9 11月 16 22:03 urandomcrw-------. 1 root root    249,   0 11月 16 22:03 usbmon0crw-------. 1 root root    249,   1 11月 16 22:03 usbmon1crw-------. 1 root root    249,   2 11月 16 22:03 usbmon2crw-rw----. 1 root tty       7,   0 11月 16 22:03 vcscrw-rw----. 1 root tty       7,   1 11月 16 22:03 vcs1crw-rw----. 1 root tty       7,   2 11月 16 22:03 vcs2crw-rw----. 1 root tty       7,   3 11月 16 22:03 vcs3crw-rw----. 1 root tty       7,   4 11月 16 22:03 vcs4crw-rw----. 1 root tty       7,   5 11月 16 22:03 vcs5crw-rw----. 1 root tty       7,   6 11月 16 22:03 vcs6crw-rw----. 1 root tty       7, 128 11月 16 22:03 vcsacrw-rw----. 1 root tty       7, 129 11月 16 22:03 vcsa1crw-rw----. 1 root tty       7, 130 11月 16 22:03 vcsa2crw-rw----. 1 root tty       7, 131 11月 16 22:03 vcsa3crw-rw----. 1 root tty       7, 132 11月 16 22:03 vcsa4crw-rw----. 1 root tty       7, 133 11月 16 22:03 vcsa5crw-rw----. 1 root tty       7, 134 11月 16 22:03 vcsa6drwxr-xr-x. 2 root root          60 11月 16 22:02 vfiocrw-------. 1 root root     10,  63 11月 16 22:03 vga_arbitercrw-------. 1 root root     10, 137 11月 16 22:02 vhcicrw-------. 1 root root     10, 238 11月 16 22:02 vhost-netcrw-------. 1 root root     10,  58 11月 16 22:03 vmcicrw-------. 1 root root     10,  56 11月 16 22:03 vsockcrw-rw-rw-. 1 root root      1,   5 11月 16 22:03 zero[root@openstack dev]#

其中:

     -:表示普通文件

    d:表示目录文件

     l:表示符号链接文件(软链接)

    c:表示字符设备文件

    b:块设备文件

    s:套接字文件socket

    p:命令管道文件pipe

ls命令选项:

   -h 人性化显示结果,如做文件大小单位换算

   -d显示目录自身属性

   -i 显示inode(index node),即文件唯一编号

   -r逆序显示

   -t按照时间顺序显示

   -R递归(recursive)显示