Monitor the disk usage using perl without pakages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rajesh Anumula
    New Member
    • Sep 2018
    • 1

    Monitor the disk usage using perl without pakages

    se strict;
    use warnings;
    my $x = <STDIN>;

    foreach my $x ( sort glob('$x/*') ) {
    my($dev,$ino,$m ode,$nlink,$uid ,$gid,$rdev,$si ze,$atime,$mtim e,$ctime,$blksi ze,$blocks)
    = stat($x);
    printf("%-40s %8u bytes\n", $x, $size);
    }
    Last edited by Rajesh Anumula; Sep 3 '18, 10:32 AM. Reason: i need to display all users in disk partition.but i am able to print only one user.can u help me regarding this issue. Thanks, Rajesh
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Rajesh Anumula:
    Simple requests for code are not what we're about at Bytes.com
    If you have a specific problem - we're happy to help.
    If you have tried something already, then post your code; however, please use the [CODE/] format tool to format your script.

    Comment

    Working...