473,386 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Disk Maintenance using Perl ?

Srijith B
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.
Jan 4 '11 #1
3 1537
dont mind... I got the solution!!
Jan 4 '11 #2
numberwhun
3,509 Expert Mod 2GB
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
Jan 4 '11 #3
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. :)
Jan 5 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Sam | last post by:
I would like to store html templates in a database. By using perl I would like to retrive the template ask the user to fill the template and store the whole file is template + the user data in a...
0
by: omkar prabhu | last post by:
i am using postgres 7.0.3 and also postgres 7.2.1 I am new towards using blobs,I want to transfers records with blobs from a table to different database(postgres) using perl without extracting...
6
by: atinti | last post by:
I'm tyring to write something that will send a simple email using Perl so far this is what I have #!/usr/bin/perl -w use strict; my $executable = "saplotus.exe'; my $server =...
8
crazy4perl
by: crazy4perl | last post by:
hi all !!! i m new to perl. can anyone here please tell me how to communicate with websites using perl. do we need to use CGI for that or simply by using perl... simply i just wnt to fill some...
6
by: nb999 | last post by:
Hello All, I need to find disk space on one of my drives in windows machine using perl. But, I cant seem to find windows command that I can script. I have performed similar task for unix...
3
by: Max58kl | last post by:
Trying to access data and print it to the screen using Perl Builders I/O Window -------------------------------------------------------------------------------- Hi I am using a program called...
3
by: poolboi | last post by:
hi guys, i dunno if this post should be in Perl or MySQL but i'm using Perl DBI to do manupilations now in MySQL i've got problem trying to input 2 arrays of data into 2 fields at the same...
0
by: koti688 | last post by:
Hi Mates, Can u Please tell me how to connect to Berkely Db using Perl . I have two files , i need to access these file using perl. These files with .db extension contains Keys and its...
3
by: flow3rgirlz | last post by:
Hi all, I'm really new to Perl. I'm not sure where to post my topic as it between Perl and Visio. Anyway, I want to run a Visio macro automatically using Perl Script. $vis->Run($macro_to_run);...
3
by: Sidra Nisar | last post by:
Hello……I am working on voice transmission control through linux as my project in high school……I need to know if the comments I have made on the following program are correct…. Object of the perl...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.