With your experience in Dos and Windows, you probably know that there are several types of files in the system, such as system files, read-only files, and hidden files. Use ls in Linux? L command to determine the file type, which can be determined based on the 10 characters in the first column. -Rw-r-r-indicates that 1.txt and myprog04 files are common files. All files starting with "-" are common files, while those starting with "d" are Directory files. Brw-rw ---- specifies/dev/sd
With your experience in Dos and Windows, you probably know that there are several types of files in the system, such as system files, read-only files, and hidden files. Use ls in Linux? L command to determine the file type, which can be determined based on the 10 characters in the first column.
-Rw-r-indicates that 1.txt and myprog04 files are common files. All files starting with "-" are common files, while those starting with "d" are Directory files.
Brw-rw ---- indicates that/dev/sda1 is a Block Device file. All files starting with "B" are block device files.
Crw-rw ---- indicates that/dev/lp0 is a character Device file. files starting with "c" are character Device files.
Srwxrwxrwx indicates that/var/lib/mysql. sock is a socket file. All files starting with "" are socket files.
Prwxr-r -- specifies that mypipe is a pipeline file. An attribute of the MPs queue file is "p ".
Lrwxrwxrwx indicates that softlinkof1.txt is a soft link file (or a symbolic link file) that refers to 1.txt. Files starting with "l" are soft-link files.
-The hard_link_of_1.txt file starting with rw-r-r-r-seems to be a common file, but it is actually a hard link file.
-Rwsr-xr-x indicates that myprog01 is an executable file with a setUid, which is determined by the fourth character "s.
-Rwxr-sr-x indicates that myprog03 is an executable file with a setGid, which is determined by "s" in the seventh character.
-Rwsr-sr-x indicates that myprog02 is an executable file with setUid and setGid. this is determined by "s" in the fourth and seventh characters.
The first "d" in drwxrwxrwt indicates that the tmp file is a directory, and the last character "t" indicates that the directory is set with a sticking bit.