linux 文件类型
ls -l列出linux的文件类型,常用的文件类型有:
- [root@openstack dev]# ls -l
- 总用量 0
- crw-rw----. 1 root video 10, 175 11月 16 22:03 agpgart
- crw-------. 1 root root 10, 235 11月 16 22:03 autofs
- drwxr-xr-x. 2 root root 180 11月 16 22:02 block
- drwxr-xr-x. 2 root root 80 11月 16 22:02 bsg
- crw-------. 1 root root 10, 234 11月 16 22:02 btrfs-control
- drwxr-xr-x. 3 root root 60 11月 16 22:02 bus
- lrwxrwxrwx. 1 root root 3 11月 16 22:03 cdrom -> sr0
- drwxr-xr-x. 2 root root 80 11月 16 22:02 centos_openstack
- drwxr-xr-x. 2 root root 2920 11月 16 22:03 char
- crw-------. 1 root root 5, 1 11月 16 22:03 console
- lrwxrwxrwx. 1 root root 11 11月 16 22:02 core -> /proc/kcore
- drwxr-xr-x. 4 root root 100 11月 16 22:02 cpu
- crw-------. 1 root root 10, 61 11月 16 22:03 cpu_dma_latency
- crw-------. 1 root root 10, 62 11月 16 22:03 crash
- drwxr-xr-x. 5 root root 100 11月 16 22:02 disk
- brw-rw----. 1 root disk 253, 0 11月 16 22:03 dm-0
- brw-rw----. 1 root disk 253, 1 11月 16 22:03 dm-1
- drwxr-xr-x. 2 root root 80 11月 16 22:02 dri
- crw-rw----. 1 root video 29, 0 11月 16 22:03 fb0
- lrwxrwxrwx. 1 root root 13 11月 16 22:02 fd -> /proc/self/fd
- brw-rw----. 1 root disk 2, 0 11月 16 22:03 fd0
- crw-rw-rw-. 1 root root 1, 7 11月 16 22:03 full
- crw-rw-rw-. 1 root root 10, 229 11月 16 22:02 fuse
- crw-------. 1 root root 248, 0 11月 16 22:03 hidraw0
- crw-------. 1 root root 10, 228 11月 16 22:03 hpet
- drwxr-xr-x. 2 root root 0 11月 16 22:02 hugepages
- crw-------. 1 root root 10, 183 11月 16 22:03 hwrng
- lrwxrwxrwx. 1 root root 25 11月 16 22:02 initctl -> /run/systemd/initctl/fifo
- drwxr-xr-x. 4 root root 300 11月 16 22:03 input
- crw-r--r--. 1 root root 1, 11 11月 16 22:03 kmsg
- srw-rw-rw-. 1 root root 0 11月 16 22:02 log
- crw-rw----. 1 root disk 10, 237 11月 16 22:02 loop-control
- drwxr-xr-x. 2 root root 100 11月 16 22:02 mapper
- crw-------. 1 root root 10, 227 11月 16 22:03 mcelog
- crw-r-----. 1 root kmem 1, 1 11月 16 22:03 mem
- drwxrwxrwt. 2 root root 40 11月 16 22:02 mqueue
- drwxr-xr-x. 2 root root 60 11月 16 22:02 net
- crw-------. 1 root root 10, 60 11月 16 22:03 network_latency
- crw-------. 1 root root 10, 59 11月 16 22:03 network_throughput
- crw-rw-rw-. 1 root root 1, 3 11月 16 22:03 null
- crw-------. 1 root root 10, 144 11月 16 22:03 nvram
- crw-------. 1 root root 1, 12 11月 16 22:03 oldmem
- crw-r-----. 1 root kmem 1, 4 11月 16 22:03 port
- crw-------. 1 root root 108, 0 11月 16 22:02 ppp
- crw-rw-rw-. 1 root tty 5, 2 11月 16 22:34 ptmx
- drwxr-xr-x. 2 root root 0 11月 16 22:02 pts
- crw-rw-rw-. 1 root root 1, 8 11月 16 22:03 random
- drwxr-xr-x. 2 root root 60 11月 16 22:02 raw
- crw-rw-r--. 1 root root 10, 57 11月 16 22:03 rfkill
- lrwxrwxrwx. 1 root root 4 11月 16 22:03 rtc -> rtc0
- crw-------. 1 root root 253, 0 11月 16 22:03 rtc0
- brw-rw----. 1 root disk 8, 0 11月 16 22:03 sda
- brw-rw----. 1 root disk 8, 1 11月 16 22:03 sda1
- brw-rw----. 1 root disk 8, 2 11月 16 22:03 sda2
- crw-rw----. 1 root cdrom 21, 0 11月 16 22:03 sg0
- crw-rw----. 1 root disk 21, 1 11月 16 22:03 sg1
- drwxrwxrwt. 2 root root 40 11月 16 22:02 shm
- crw-------. 1 root root 10, 231 11月 16 22:03 snapshot
- drwxr-xr-x. 2 root root 80 11月 16 22:02 snd
- brw-rw----. 1 root cdrom 11, 0 11月 16 22:03 sr0
- lrwxrwxrwx. 1 root root 15 11月 16 22:02 stderr -> /proc/self/fd/2
- lrwxrwxrwx. 1 root root 15 11月 16 22:02 stdin -> /proc/self/fd/0
- lrwxrwxrwx. 1 root root 15 11月 16 22:02 stdout -> /proc/self/fd/1
- crw-rw-rw-. 1 root tty 5, 0 11月 16 22:03 tty
- crw--w----. 1 root tty 4, 0 11月 16 22:03 tty0
- crw--w----. 1 root tty 4, 1 11月 16 22:03 tty1
- crw--w----. 1 root tty 4, 10 11月 16 22:03 tty10
- crw--w----. 1 root tty 4, 11 11月 16 22:03 tty11
- crw--w----. 1 root tty 4, 12 11月 16 22:03 tty12
- crw--w----. 1 root tty 4, 13 11月 16 22:03 tty13
- crw--w----. 1 root tty 4, 14 11月 16 22:03 tty14
- crw--w----. 1 root tty 4, 15 11月 16 22:03 tty15
- crw--w----. 1 root tty 4, 16 11月 16 22:03 tty16
- crw--w----. 1 root tty 4, 17 11月 16 22:03 tty17
- crw--w----. 1 root tty 4, 18 11月 16 22:03 tty18
- crw--w----. 1 root tty 4, 19 11月 16 22:03 tty19
- crw--w----. 1 root tty 4, 2 11月 16 22:03 tty2
- crw--w----. 1 root tty 4, 20 11月 16 22:03 tty20
- crw--w----. 1 root tty 4, 21 11月 16 22:03 tty21
- crw--w----. 1 root tty 4, 22 11月 16 22:03 tty22
- crw--w----. 1 root tty 4, 23 11月 16 22:03 tty23
- crw--w----. 1 root tty 4, 24 11月 16 22:03 tty24
- crw--w----. 1 root tty 4, 25 11月 16 22:03 tty25
- crw--w----. 1 root tty 4, 26 11月 16 22:03 tty26
- crw--w----. 1 root tty 4, 27 11月 16 22:03 tty27
- crw--w----. 1 root tty 4, 28 11月 16 22:03 tty28
- crw--w----. 1 root tty 4, 29 11月 16 22:03 tty29
- crw--w----. 1 root tty 4, 3 11月 16 22:03 tty3
- crw--w----. 1 root tty 4, 30 11月 16 22:03 tty30
- crw--w----. 1 root tty 4, 31 11月 16 22:03 tty31
- crw--w----. 1 root tty 4, 32 11月 16 22:03 tty32
- crw--w----. 1 root tty 4, 33 11月 16 22:03 tty33
- crw--w----. 1 root tty 4, 34 11月 16 22:03 tty34
- crw--w----. 1 root tty 4, 35 11月 16 22:03 tty35
- crw--w----. 1 root tty 4, 36 11月 16 22:03 tty36
- crw--w----. 1 root tty 4, 37 11月 16 22:03 tty37
- crw--w----. 1 root tty 4, 38 11月 16 22:03 tty38
- crw--w----. 1 root tty 4, 39 11月 16 22:03 tty39
- crw--w----. 1 root tty 4, 4 11月 16 22:03 tty4
- crw--w----. 1 root tty 4, 40 11月 16 22:03 tty40
- crw--w----. 1 root tty 4, 41 11月 16 22:03 tty41
- crw--w----. 1 root tty 4, 42 11月 16 22:03 tty42
- crw--w----. 1 root tty 4, 43 11月 16 22:03 tty43
- crw--w----. 1 root tty 4, 44 11月 16 22:03 tty44
- crw--w----. 1 root tty 4, 45 11月 16 22:03 tty45
- crw--w----. 1 root tty 4, 46 11月 16 22:03 tty46
- crw--w----. 1 root tty 4, 47 11月 16 22:03 tty47
- crw--w----. 1 root tty 4, 48 11月 16 22:03 tty48
- crw--w----. 1 root tty 4, 49 11月 16 22:03 tty49
- crw--w----. 1 root tty 4, 5 11月 16 22:03 tty5
- crw--w----. 1 root tty 4, 50 11月 16 22:03 tty50
- crw--w----. 1 root tty 4, 51 11月 16 22:03 tty51
- crw--w----. 1 root tty 4, 52 11月 16 22:03 tty52
- crw--w----. 1 root tty 4, 53 11月 16 22:03 tty53
- crw--w----. 1 root tty 4, 54 11月 16 22:03 tty54
- crw--w----. 1 root tty 4, 55 11月 16 22:03 tty55
- crw--w----. 1 root tty 4, 56 11月 16 22:03 tty56
- crw--w----. 1 root tty 4, 57 11月 16 22:03 tty57
- crw--w----. 1 root tty 4, 58 11月 16 22:03 tty58
- crw--w----. 1 root tty 4, 59 11月 16 22:03 tty59
- crw--w----. 1 root tty 4, 6 11月 16 22:03 tty6
- crw--w----. 1 root tty 4, 60 11月 16 22:03 tty60
- crw--w----. 1 root tty 4, 61 11月 16 22:03 tty61
- crw--w----. 1 root tty 4, 62 11月 16 22:03 tty62
- crw--w----. 1 root tty 4, 63 11月 16 22:03 tty63
- crw--w----. 1 root tty 4, 7 11月 16 22:03 tty7
- crw--w----. 1 root tty 4, 8 11月 16 22:03 tty8
- crw--w----. 1 root tty 4, 9 11月 16 22:03 tty9
- crw-rw----. 1 root dialout 4, 64 11月 16 22:03 ttyS0
- crw-rw----. 1 root dialout 4, 65 11月 16 22:03 ttyS1
- crw-rw----. 1 root dialout 4, 66 11月 16 22:03 ttyS2
- crw-rw----. 1 root dialout 4, 67 11月 16 22:03 ttyS3
- crw-------. 1 root root 10, 239 11月 16 22:02 uhid
- crw-------. 1 root root 10, 223 11月 16 22:02 uinput
- crw-rw-rw-. 1 root root 1, 9 11月 16 22:03 urandom
- crw-------. 1 root root 249, 0 11月 16 22:03 usbmon0
- crw-------. 1 root root 249, 1 11月 16 22:03 usbmon1
- crw-------. 1 root root 249, 2 11月 16 22:03 usbmon2
- crw-rw----. 1 root tty 7, 0 11月 16 22:03 vcs
- crw-rw----. 1 root tty 7, 1 11月 16 22:03 vcs1
- crw-rw----. 1 root tty 7, 2 11月 16 22:03 vcs2
- crw-rw----. 1 root tty 7, 3 11月 16 22:03 vcs3
- crw-rw----. 1 root tty 7, 4 11月 16 22:03 vcs4
- crw-rw----. 1 root tty 7, 5 11月 16 22:03 vcs5
- crw-rw----. 1 root tty 7, 6 11月 16 22:03 vcs6
- crw-rw----. 1 root tty 7, 128 11月 16 22:03 vcsa
- crw-rw----. 1 root tty 7, 129 11月 16 22:03 vcsa1
- crw-rw----. 1 root tty 7, 130 11月 16 22:03 vcsa2
- crw-rw----. 1 root tty 7, 131 11月 16 22:03 vcsa3
- crw-rw----. 1 root tty 7, 132 11月 16 22:03 vcsa4
- crw-rw----. 1 root tty 7, 133 11月 16 22:03 vcsa5
- crw-rw----. 1 root tty 7, 134 11月 16 22:03 vcsa6
- drwxr-xr-x. 2 root root 60 11月 16 22:02 vfio
- crw-------. 1 root root 10, 63 11月 16 22:03 vga_arbiter
- crw-------. 1 root root 10, 137 11月 16 22:02 vhci
- crw-------. 1 root root 10, 238 11月 16 22:02 vhost-net
- crw-------. 1 root root 10, 58 11月 16 22:03 vmci
- crw-------. 1 root root 10, 56 11月 16 22:03 vsock
- crw-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)显示
夜色http://liuqun.blog.51cto.com/3544993/1982640
linux文件类型
linux 文件类型
原文:http://liuqun.blog.51cto.com/3544993/1982640
来源: http://www.bubuko.com/infodetail-2397781.html