 for normal files in the file system, unix does not impose or provide any internal file structure. this implies that from the point of view of the operating system, there is only one file type. the structure and interpretation thereof is entirely dependent on how the file is interpreted by software. unix does however have some special files. these special files can be identified by the ls -l command which displays the type of the file in the first alphabetic letter of the file system permissions field. a normal (regular) file is indicated by a hyphen-minus '-'. ==regular file==  being the well known entity files are, files are also called "regular files" to distinguish them from "special files". they show up in ls -l without a specific character in the mode field: $ ls -dl /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, both native and non-native, are available under unix, there is not 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 ==named pipe==  one of the strengths of unix has always been inter-process communication. amongst the facilities provided by the os are pipes. these pipes connect the output of one process to the input of another. this is fine if both processes are living in the same parent process space, started by the same user. there are however circumstances where the communicating processes must use named pipes. one such circumstance is that the processes have to be executed under different user names and permissions. these named pipes are special files that can exist anywhere in the file system. these named pipe special files are made 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. 
Unix_file_system_technology