Unix file types

The seven standard Unix file types are regular, directory, symbolic link, FIFO special, block special, character special, and socket as defined by POSIX.[1] Different OS-specific implementations allow more types than what POSIX requires (e.g. Solaris doors). A file's type can be identified by the ls -l command, which displays the type in the first character of the file-system permissions field.

For regular files, Unix does not impose or provide any internal file structure; therefore, their structure and interpretation is entirely dependent on the software using them.[2] However, the file command can usually be used to determine what type of data they contain.[3]

  1. ^ "<sys/stat.h>". The Open Group Base Specifications Issue 6. The Open Group. 21 July 2019.
  2. ^ Loukides, Mike (October 2002). "When Is a File Not a File?". Unix Power Tools (3 ed.). O'Reilly. p. 80. ISBN 9780596003302. A file is nothing more than a stream of bytes ...
  3. ^ "file". IEEE Std 1003.1-2017 (POSIX). The Open Group. 2018.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search