part of original file [ stat.c ]

/* stat.c -- display file or file system status
   Copyright (C) 2001-2009 Free Software Foundation, Inc.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see .

   Written by Michael Meskes.  */

   /* Temporary hack to match original output until conditional
             implemented.  */
          if (S_ISBLK (statbuf.st_mode) || S_ISCHR (statbuf.st_mode))
            {
              format =
                "  File: %Nn"
                "  Size: %-10stBlocks: %-10b IO Block: %-6o %Fn"
                "Device: %Dh/%ddtInode: %-10i  Links: %-5h"
                " Device type: %t,%Tn"
                "Access: (%04a/%10.10A)  Uid: (%5u/%8U)   Gid: (%5g/%8G)n"
                "Access: %xn" "Modify: %yn" "Change: %zn";
            }
          else
            {
              format =
                "  File: %Nn"
                "  Size: %-10stBlocks: %-10b IO Block: %-6o %Fn"
                "Device: %Dh/%ddtInode: %-10i  Links: %hn"
                "Access: (%04a/%10.10A)  Uid: (%5u/%8U)   Gid: (%5g/%8G)n"
                "Access: %xn" "Modify: %yn" "Change: %zn";
            }

http://en.wikipedia.org/wiki/Data_structure

 

Leave a Reply

Your email address will not be published. Required fields are marked *