home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume7 / nlist / file.sun < prev    next >
Encoding:
Text File  |  1989-08-05  |  823 b   |  29 lines

  1. #! /bin/sh
  2.  
  3. echo "Dumping 10 entries of the file table. Note that _file is the ADDRESS of
  4. the file table and not the file table itself"
  5.  
  6. # description (lines following the 'nlist' line)
  7. # line 1:     header
  8. # line 2:     read '_file' once
  9. # line 3:     set address of next field to content of previous field
  10. # line 4:     read that and increment by 26 next time
  11. # line 5:     read rest of structure with auto increment
  12.  
  13. nlist -a -s 0 -f7x -h 1 -l 10           \
  14.     '^. 1 +        :"  #"     %3d' \
  15.     '_file!'                        \
  16.     '&+1!#-1'                       \
  17.     '>26        : flag     %4o' \
  18.     '|2        : type     %6x' \
  19.     '|2        : count    %6d' \
  20.     '|2        : msgcount %6d' \
  21.     '        : fops'         \
  22.     '        : fdata'        \
  23.     '        : offset   %6x' \
  24.     '        : cred'         \
  25.     '&. = #-1 |2    : Crref    %5d' \
  26.         '|2        : Uid      %4u' \
  27.         '|2        : Gid      %4u'
  28.  
  29.