File type
Common types of Linux files are: Normal files, directories, character device files, block device files, symbolic link files, and so on.
Classification
Identification |
type |
Notes |
D |
Directory |
|
- |
File |
|
C |
String device |
|
L |
A soft connection file, equivalent to a shortcut to window, is plainly a pointer to |
|
B |
Block device, block, disc, disk |
|
S |
Socket file, for communication |
|
How to view File types
Using the ls -l
command, in the first column of the list of details, the identity on the first location is the type of the file
[[email protected] ~]# Ls-la total usage 32dr-xr-x---. 3 root root 163 June 3 00:41. Dr-xr-xr-x. Root root 244 June 2 09:45..
-RW-------. 1 root root 1422 May 00:07 anaconda-ks.cfg-rw-------. 1 root root 3826 June 2 22:33. Bash_history-rw-r--r--. 1 root root 18 December bash_logout
Ls-la/devcrw-rw-rw-1 root root 1, 7 June 2 14:50 fullcrw-rw-rw-1 root root 10, 229 June 2 14:50 Fuse
lrwxrwxrwx 1 root root 3 June 2 14:50 cdrom-sr0
BRW-RW----1 root disk 8, 3 June 2 14:50 Sda3
When we start the MySQL server, a mysql.sock file is generated.
[[email protected] ~]# ls-lh/var/lib/mysql/mysql.socksrwxrwxrwx 1 mysql mysql 0 04-19 11:12/var/lib/mysql/mysql.sock
This article is from the "Linux Road" blog, make sure to keep this source http://allin28.blog.51cto.com/12931477/1932133
File types for Linux