Types of files

Updated: May 06, 2022

QNX Neutrino supports various types of files. The file type gives you a hint about what type of data the file contains and how you should expect the file to behave.

The ls -l command uses the character shown in parentheses below to identify the file type:

Regular (-)
A file that contains user data, such as C code, HTML, and data. For example, /home/fred/myprog.c.
Directory (d)
Conceptually, a directory is something that contains files and other directories. For example, /home/fred.
Symbolic link (l)
An additional name for a file or directory. For example, /usr/bin/more is a symbolic link to /usr/bin/less. For more information, see Links and inodes in Working with Filesystems.
Named special (n)
A special-purpose file that doesn't fit the behavior or content type of any other type of file. For example, /proc/dumper represents the hook for generating core dumps when an application crashes, and /dev/random represents a source of random numbers.
Character special files (c)
Entries that represent a character device. For example, /dev/ser1 represents a serial port.
FIFO special files (p)
Persistent named pipes through which two programs communicate. For example, PipeA.
Block special files (b)
Entries that represent a block device, such as a disk. For example, /dev/hd0 represents the raw block data of your primary disk drive.
Socket files (s)
Entries that represent a communications socket, especially a Unix-domain socket. For more information, see socket() and the Unix protocol in the QNX Neutrino C Library Reference.

Some files are persistent across system reboots, such as most files in a disk filesystem. Other files may exist only as long as the program responsible for them is running. Examples of these include shared memory objects, objects in the /proc filesystem, and temporary files on disk that are still being accessed even though the links to the files (their filenames) have been removed.