AIX

 View Only
  • 1.  stat command for AIX

    Posted Thu April 29, 2021 03:16 PM
    Hello AIX community,
    At my place our scripts across platform between AIX & Linux are failing, being stat command not available on AIX. 
    istat exist on AIX but it does not fulfil the requirements.

    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
    [mafzal10@fmc103206 ~]$

    If stat command can be provided thru IBM toolbox , it will be great help.

    Thanks 
    Afzal Muhammad 
    Ford Motor Co USA

    ------------------------------
    Muhammad' Afzal
    ------------------------------


  • 2.  RE: stat command for AIX

    Posted Thu April 29, 2021 03:25 PM
    On Thu, Apr 29, 2021 at 07:16:18PM +0000, Muhammad' Afzal via IBM Community wrote:
    > At my place our scripts across platform between AIX & Linux are
    > failing, being stat command not available on AIX. istat exist on
    > AIX but it does not fulfil the requirements.

    Consider using Perl's built in stat() function. It's trivial to call
    from a script.




  • 3.  RE: stat command for AIX

    Posted Fri April 30, 2021 02:06 AM
    Hi, I think it is already available in the toolbox (in coreutils-8.32-1.ppc).

    # yum install stat
    ....blah....
    # stat -c %Y hello
    1617843803


    ------------------------------
    CHRIS GIBSON
    ------------------------------



  • 4.  RE: stat command for AIX

    Posted Fri April 30, 2021 03:12 AM
    Edited by SANKET RATHI Fri April 30, 2021 03:12 AM
    Opensource stat command is available from AIX toolbox. The command is part of coreutils rpm package.

    ------------------------------
    SANKET RATHI
    ------------------------------