and the permissions are rwxr-xr-x. Examples of implementations The GNU coreutils version of ls uses a call to filemode(), a glibc function (exposed in the gnulib library) to get the mode string. FreeBSD uses a simpler approach but allows a smaller number of file types. Regular file Regular files show up in ls -l with a hyphen-minus - in the mode field: $ ls -l /etc/passwd -rw-r--r-- ... /etc/passwd Directory The most common special file is the directory. The layout of a directory file is defined by the filesystem used. As several filesystems are available under Unix, both native and non-native, there is no one directory file layout. A directory is marked with a d as the first letter in the mode field in the output of ls -dl or stat, e.g. $ ls -dl / drwxr-xr-x 26 root root 4096 Sep 22 09:29 / $ stat / File: "/" Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 802h/2050d Inode: 128 Links: 26 Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) ... Symbolic link A symbolic link is a reference to another file. This special file is stored as a textual representation of the referenced file's path (which means the destination may be a relative path, or may not exist at all). A symbolic link is marked with an l (lower case L) as the first letter of the mode string, e.g. lrwxrwxrwx ... termcap -> /usr/share/misc/termcap lrwxrwxrwx ... S03xinetd -> ../init.d/xinetd FIFO (named pipe) One of the strengths of Unix has always been inter-process communication. Among the facilities provided by the OS are pipes, which connect the output of one process to the input of another. This is fine if both processes exist in the same parent process space, started by the same user, but there are circumstances where the communicating processes must use FIFOs, here referred to as named pipes. One such circumstance occurs when the processes must be executed under different user names and permissions. Named pipes are special files that can exist anywhere in the file system. They can be created with the command mkfifo as in mkfifo mypipe. A named pipe is marked with a p as the first letter of the mode string, e.g. prw-rw---- ... mypipe Socket A socket is a special file used for inter-process communication, which enables communication between two processes. In addition to sending data, processes can