AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  stat command for AIX

    Posted Thu April 29, 2021 03:16 PM
    Our scripts are failing on cross plartform between AIX and Linux as there is no "stat" command available on AIX.
    istat does exist on AIX but does not serve the purpose.
    If stat rpm's can be made available thru IBM toolbox .  

    istat example on AIX
    ==================================
    root@lpar59919:/usr/local/bin# istat getsacm
    Inode 48 on device 10/16 File
    Protection: rwxr-xr-x
    Owner: 0(root) Group: 0(system)
    Link count: 1 Length 2258 bytes
    Last updated: Thu Apr 29 09:13:33 EDT 2021
    Last modified: Thu Apr 29 09:13:33 EDT 2021
    Last accessed: Thu Apr 29 09:35:44 EDT 2021
    root@lpar59919:/usr/local/bin#
    =============================
    stat example on LINUX servers
    =============================
    [mafzal10@fmc103206 ~]$ stat -c %Y test
    1619702293
    [==

    ------------------------------
    Muhammad' Afzal
    AIX Engineer
    Ford Motor Compnay
    Dearborn MI
    ------------------------------


  • 2.  RE: stat command for AIX

    Posted Fri April 30, 2021 03:17 AM
    You can install coreutils rpm from Toolbox to get the similar stat command.
    # rpm -qf /opt/freeware/bin/stat
    coreutils-8.32-1.ppc


    ------------------------------
    Ayappan P
    ------------------------------