:: Re: [DNG] terminology
Pàgina inicial
Delete this message
Reply to this message
Autor: karl
Data:  
A: dng
Assumpte: Re: [DNG] terminology
Hendrik:
> On Mon, Aug 24, 2020 at 01:51:05AM +0200, karl@??? wrote:
> > Hendrik:
> > > There are files and directories.
> > >
> > > Is there an establiched word in the Linux/Unix xommunity
> > > for something which might be a file or a directory?
> >
> > One could possible use "file system node", perhaps shortened to fsnode.
>
> Yes. That might work.
> I was hoping to find a well-known estabished word.
> At least this has the right meaning.
> Someone familiar with the insides of file systems might
> know more,,,


Well, "file" is the well-known established word, it is just linux that
forces you to use ls/readdir() instead of cat/read() on directories
which works for other unices (at least used to work, I havn't checked
reasently).

What do you want to use it for ?

///

(git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git)
$ fgrep -B1 -A14 'File types' linux-stable-rt/include/linux/fs.h
/*
 * File types
 *
 * NOTE! These match bits 12..15 of stat.st_mode
 * (ie "(i_mode >> 12) & 15").
 */
#define DT_UNKNOWN      0
#define DT_FIFO         1
#define DT_CHR          2
#define DT_DIR          4
#define DT_BLK          6
#define DT_REG          8
#define DT_LNK          10
#define DT_SOCK         12
#define DT_WHT          14


$ man find | grep -A19 '  -type c' | grep ' '
       -type c
              File is of type c:
              b      block (buffered) special
              c      character (unbuffered) special
              d      directory
              p      named pipe (FIFO)
              f      regular file
              l      symbolic link; this is never true if the -L option or the
                     -follow  option is in effect, unless the symbolic link is
                     broken.  If you want to search for symbolic links when -L
                     is in effect, use -xtype.
              s      socket
$


See also the discussion about 'The file type and mode' in man inode.

Regards,
/Karl Hammar