what is a regular file on unix what is a regular file on unix unix unix

what is a regular file on unix


They're text or binary data, called 'regular files' to distinguish them from other types like directories, symbolic links, sockets etc.

Take a look at http://en.wikipedia.org/wiki/Unix_file_types


Non-regular files are devices, pipes, sockets... try [ -f /dev/tty0 ], for example. Symlinks are also non-regular, but they're resolved by test -f.


It is not a directory, device file, block device, FIFO or socket. If you do an ls -l. The ones which start with a "-" are the files. Actually what most people to refer as just a file.