bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

coreutils-5.1.2 and the stat command


From: Nelson H. F. Beebe
Subject: coreutils-5.1.2 and the stat command
Date: Sat, 31 Jan 2004 18:21:29 -0700 (MST)

The GNU coreutils stat command is a nice addition to the Unix
toolbox.  However, it seems to have a small deficiency on some
systems.

Compare this output from Red Hat Advanced Server GNU/Linux:

        % ls -l --full-time /bin/true
        -rwxr-xr-x  1 root root 19960 2001-07-23 10:53:42.000000000 -0600 
/bin/true

        % stat /bin/true
          File: `/bin/true'
          Size: 19960           Blocks: 40         IO Block: 16384  regular file
        Device: 803h/2051d      Inode: 1259185     Links: 1
        Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
        Access: 2004-01-28 14:44:08.000000000 -0700
        Modify: 2001-07-23 10:53:42.000000000 -0600
        Change: 2004-01-21 11:36:07.000000000 -0700

with this output on SGI IRIX 6.5:

        % ls -l --full-time /bin/true
        -rwxr-xr-x  1 root sys 312 1999-11-04 12:07:38.887783200 -0700 /bin/true

        % stat /bin/true
          File: `/bin/true'
          Size: 312             Blocks: 8          IO Block: 65536  regular file
        Device: eeh/238d        Inode: 380         Links: 1
        Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/     sys)
        Access: 2003-12-09 09:02:56.000000000 -0700
        Modify: 1999-11-04 12:07:38.000000000 -0700
        Change: 1999-11-04 12:07:38.000000000 -0700

and with the native SGI stat command:

        % /sbin/stat /bin/true
        /bin/true:
                inode 380; dev 238; links 1; size 312
                regular; mode is rwxr-xr-x; uid 0 (root); gid 0 (sys)
                projid 0        st_fstype: xfs
                change time - Thu Nov  4 12:07:38 1999 <941742458>
                access time - Tue Dec  9 09:02:56 2003 <1070985776>
                modify time - Thu Nov  4 12:07:38 1999 <941742458>

I suspect that the omission of the nanoseconds values in the
timestamps reported by GNU stat is simply an oversight that can be
easily rectified, and should be.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: address@hidden  -
- 155 S 1400 E RM 233                       address@hidden  address@hidden -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]