Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

https://www.computerhope.com/jargon/r/regular-file.htm

  • In the Linux kernel, file types are declared in the header file sys/stat.h. The type name, symbolic name, and bitmask for each Linux file type are listed below.
Type name Symbolic name Bitmask
Socket S_IFSOCK 0140000
Symbolic link S_IFLNK 0120000
Regular file S_IFREG 0100000
Block special file S_IFBLK 0060000
Directory S_IFDIR 0040000
Character device S_IFCHR 0020000
FIFO (first in, first out) S_IFIFO 0010000

Most files used directly by a human user are regular files. For example, executable files, text files, and image files are regular files.

  • list regular file
find -type f 
  • check is regular file
test -f file 

returns an exit status of 0 if file is a regular file. It returns 1 if file is of another type or does not exist.

评论