OK to start this is not homework just a play around script for work.
Here is what I need to do. I have a simple text file with directories listed in it. the directories are broken into 4 sections.
I need to read each section and get a total space used of the directories listed. There will be directories not listed so that will be the others.
The requirements I need is to
A. Know the total size of volume I am working with
B. Know the total size of all the directories on each section.
C. Take the total from "B" and subtract from "A" to get "C"
The most I have is getting directory size but only from current I know very little of perl and if some direction can be given I will start putting together and posting what I came up with I just need direction.
I have example in post
here is more detail if that helps
Each section could have as many as 20 directories to look into. and total each one individually. Then taking those totals and subtracting from overall size of file system to be classified as other.
So output would look like
File system size = XXXXXGB
Section 1 = xxGB
Section 2 = xxxxGB
Section 3 = xxGB
Other = xxxGB
The script would only be ran quarterly unless needed more often to see who and what is using space. We have requirements for who is allocated what for space and just want to make sure we don't have any users or builds taking more than there allocation.
Please post your code and point out (with clear details) the portion that is giving you trouble. Include any errors/warnings that it generates. That is the minimum starting point we need to be able to help you.