Regular files are the most common. When a word processing program is used to create a document, both the program and the document are contained in regular files. Regular files contain either text or binary information. Text files are readable by the user. Binary files are readable by the computer.
Binary files can be executable files that instruct the system to accomplish a job.
Commands, shell scripts, and other programs are stored in executable files. Directories contain information the system needs to access all types of files, but they do not contain the actual file data. As a result, directories occupy less space than a regular file and give the file-system structure flexibility and depth. Directories are created and controlled by a separate set of commands. Special files define devices for the system or temporary files created by processes.