readdir(3am)


NAME

   readdir - directory input parser for gawk

SYNOPSIS

   @load "readdir"

DESCRIPTION

   The readdir extension adds an input parser for directories.

   When this extension is in use, instead of skipping directories named on
   the command line (or with getline), they  are  read,  with  each  entry
   returned as a record.

   The record consists of three fields. The first two are the inode number
   and the filename, separated by a forward slash character.   On  systems
   where  the  directory  entry  contains  the file type, the record has a
   third field which is a single letter indicating the type of the file: f
   for  file,  d  for  directory,  b for a block device, c for a character
   device, p for a FIFO, l for a symbolic link, s  for  a  socket,  and  u
   (unknown) for anything else.

   On systems without the file type information, the third field is always
   u.

NOTES

   On GNU/Linux systems, there are  filesystems  that  don't  support  the
   d_type  entry  (see readdir(3)), and so the file type is always u.  You
   can use the filefuncs extension to call stat() in order to get  correct
   type information.

EXAMPLE

   @load "readdir"
   ...
   BEGIN { FS = "/" }
   { print "file name is", $2 }

SEE ALSO

   GAWK:   Effective   AWK   Programming,   filefuncs(3am),  fnmatch(3am),
   fork(3am), inplace(3am),  ordchr(3am),  readfile(3am),  revoutput(3am),
   rwarray(3am), time(3am).

   opendir(3), readdir(3), stat(2).

AUTHOR

   Arnold Robbins, arnold@skeeve.com.

COPYING PERMISSIONS

   Copyright  2012, 2013, Free Software Foundation, Inc.

   Permission  is  granted  to make and distribute verbatim copies of this
   manual page provided the copyright notice and  this  permission  notice
   are preserved on all copies.

   Permission  is granted to copy and distribute modified versions of this
   manual page under the conditions for verbatim  copying,  provided  that
   the  entire  resulting derived work is distributed under the terms of a
   permission notice identical to this one.

   Permission is granted to  copy  and  distribute  translations  of  this
   manual  page  into  another  language,  under  the above conditions for
   modified versions, except that this permission notice may be stated  in
   a translation approved by the Foundation.


More Linux Commands

manpages/gv2gml.1.html
gv2gml(1) GML-DOT converters (Commands - Linux man page)....
gml2gv converts a graph specified in the GML format to a graph in the GV (formerly DOT) format. gv2gml converts a graph specified in the GV format to a graph in

manpages/wbinfo.1.html
wbinfo(1) - Query information from winbind daemon (ManPage)
This tool is part of the samba(7) suite. The wbinfo program queries and returns information created and used by the winbindd(8) daemon. The winbindd(8) daemon m

manpages/divertctrl.8.html
divertctrl.8 (Manual - Linux man page).....................
divertctrl is used to de/activate call diversions and query actual activated diversion rules. The i4l diversion services only work using the (E)DSS1 D-channel p

manpages/git-merge-tree.1.html
git-merge-tree(1) - Show three-way merge without touching in
Reads three tree-ish, and output trivial merge results and conflicting stages to the standard output. This is similar to what three-way git read-tree -m does, b

manpages/desktop-file-install.1.html
desktop-file-install(1) - Install desktop files (Man Page)
The desktop-file-install program is a tool to install, and optionally edit, desktop files. The desktop-file-edit program is a tool to edit a desktop file. They

manpages/Mail::SPF::Mech::IP6.3pm.html
Mail::SPF::Mech::IP6(3pm) - SPF record "ip6" mechanism class
An object of class Mail::SPF::Mech::IP6 represents an SPF record mechanism of type ip6. Constructors The following constructors are provided: new(%options): ret

manpages/ldap_parse_sasl_bind_result.3.html
ldap_parse_sasl_bind_result(3) - Parsing results (Man Page)
These routines are used to extract information from a result message. They will operate on the first result message in a chain of search results (skipping past

manpages/XConfigureEvent.3.html
XConfigureEvent(3) - ConfigureNotify event structure........
The structure for ConfigureNotify events contains: typedef struct { int type; /* ConfigureNotify */ unsigned long serial; /* # of last request processed by serv

manpages/epoll_pwait.2.html
epoll_wait(2) - wait for an I/O event on an epoll file descr
The epoll_wait() system call waits for events on the epoll(7) instance referred to by the file descriptor epfd. The memory area pointed to by events will contai

manpages/XRRQueryVersion.3.html
XRRQueryVersion(3) - X Resize, Rotate and Reflection extensi
Xrandr is a simple library designed to interface the X Resize and Rotate Extension. This allows clients to change the size and rotation of the root window of a

manpages/ldap_abandon_ext.3.html
ldap_abandon_ext(3) - Abandon an LDAP operation in progress
The ldap_abandon_ext() routine is used to send a LDAP Abandon request for an operation in progress. The msgid passed should be the message id of an outstanding

manpages/combinedeltarpm.8.html
combinedeltarpm(8) - combine multiple deltarpms to a single
combinedeltarpm creates a new deltarpm from multiple old ones. Applying the rsulting deltarpm has the same effect as applying each of the old ones in the specif





We can't live, work or learn in freedom unless the software we use is free.