Disk Maintenance using Perl ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Srijith B
    New Member
    • Jan 2011
    • 20

    Disk Maintenance using Perl ?

    Hi,
    I have a code which maintains a certain partition in of my SD card.
    The code will
    -> Warn if the free space is less than 2%
    -> Else prints a complement statement

    I want the program to print these details only when a copying or moving operation is done.



    I have kept a infinite while loop, so that the program keeps on checking the disk, But display messages only when there is a change in disk space.

    But when I execute this code( for the disk is not full), it is continue-sly displaying this message:

    Use of uninitialized value $old_free in numeric eq (==) at ./df2.pl line 30.
    Free Disk space is 2.51% (YOU CAN STILL COPY ITEMS TO THIS DISK)

    infinite number of times..


    I want it to say only:
    Free Disk space is 2.51% (YOU CAN STILL COPY ITEMS TO THIS DISK)

    and wait till a copy or move action,

    once a copy or move action done, then it should again print suitable message then again wait.

    Please use the same logic and help me in rectifying the error.
  • Srijith B
    New Member
    • Jan 2011
    • 20

    #2
    dont mind... I got the solution!!

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      Ok, but please know that next time, there is no way for us to help you if you don't post the code you are referring to, here in your posting.

      Regards,

      Jeff

      Comment

      • Srijith B
        New Member
        • Jan 2011
        • 20

        #4
        Yup! I did. But once I got the solution by myself, I wanted to remove the whole question, but I couldn't. So I removed the code. :)

        Comment

        Working...