Folder level size monitoring


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Folder level size monitoring
# 22  
Old 10-07-2011
Hi Alister,

Totally accept your comment. Should have been very clear with my requirements. It's only that I have been testing Robin's code and realizing that I would need more stuff. Sorry about that. Yes, I think it would be grt if the code can also include (apart from the top level directory) to give me the list of directory size of the individual sub-directories (size to include the contents of all its subdirectories). And this means that any directory meeting exceeding the growth limit will cause all components of its path to also exceed their limit. With his I will know which sub-directory under a directory/sub-directory is hitting the size limit. It would also be great if we can report on the actual size in KB or MB.

Thanks
# 23  
Old 10-10-2011
Hi Robin,

If possible can you please help me out with my last two posts/comments.

Thanks
# 24  
Old 10-10-2011
Lightbulb

Well, all the variables/values should already be there for you to craft an appropriate message. have you read the code and understood it? If so, then I would hope that you would have the information to acheive this.

Sizes reported by du differ by installation, but you should get KB by using the -k flag, or there may be other options available to you. Check the manual page.

Subdirectoriesare being explicitly rolled into the parent directory with -s Again, check your man page for any other variations that might be available. If you want all sub-directories then this vastly increases the risk that it will go seriously SmiliewildSmilie if a user creates or deletes a directory. Probably best to give a top level report and instruct users how to check subdirectory usage themselves.

Have you considered enforcing some sort of quota? Various operating systems allow you to set a quota. Another way would be to have a report run each day that reports anything large, but that will probably lead to manual checking I'm afriad.



I hope that this helps,
Robin
Liverpool/Blackburn
# 25  
Old 10-10-2011
Hi Robin,

Thanks. As informed earlier, I am new to scripts...though I can understand what the script does..I am not sure how to extract the size part from it. I will give it a try and let you know.

Regards.
# 26  
Old 10-12-2011
Hi Robin,

Thanks for the tip. I used the prev_size and curr_size varibales to get the directory size representation in the alert email. A big Thank you for helping me out with this.

Regards.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting folder more than 100K size

Hi , I am trying to get the folder details having size more than sme specified value and also the name of the folder should be like TEST. so 1. In the current directory search for all the folders having name like TEST 2. Print the list of the folder names having size more than 100... (3 Replies)
Discussion started by: Anupam_Halder
3 Replies

2. UNIX for Dummies Questions & Answers

General question about folder level permissions

How is the level of access on a particular folder determined? I have heard (its just hearsay so am not particularly sure of it) that the access a particular user/group has to a low level directory is also affected by the level of access granted to the user/group on its parent directories. e.g. ... (1 Reply)
Discussion started by: jawsnnn
1 Replies

3. Shell Programming and Scripting

Log folder size monitoring script

Hi All, Can anyone refer to me a readymade script for the purpose of log folder size monitoring script. Example : I have a log folder of size 10 G, and as the logs keep accumulating the folder gets full and i have to manually zip/remove the files in order to keep the server running. Something... (1 Reply)
Discussion started by: findjai
1 Replies

4. UNIX for Dummies Questions & Answers

Network monitoring at boot level.

Whenever i start my server it takes app 2 minutes to get into network (After starting the network service on boot). I inquire the network guys for possible causes but they say it will need both side monitoring . One is switch side and the second is server side. I m not sure how do i check... (6 Replies)
Discussion started by: pinga123
6 Replies

5. UNIX for Dummies Questions & Answers

Redirect with htaccess to upper level folder, how to?

Hello, Well I have a web with a very bad structure (a vBulletin forum) and I want it redirected to a newer folder in the same server but with a upper level folder. Current structure is: https://www.unix.com/vbulletin/upload/index.php And I want it to be:... (0 Replies)
Discussion started by: Rafaweb
0 Replies

6. UNIX for Dummies Questions & Answers

find files on first level folder

Hi: I have: folderA |----folderB |----folder1 |----folder2 |----folder3 |----folder3.1 Question: How can I find *.txt ONLY from /folderA/folderB/ and not the others folder1,2,3?? I tried: find... (8 Replies)
Discussion started by: iga3725
8 Replies

7. Cybersecurity

Ubuntu folder level security

I have installed ubuntu. And I have create users ans groups. Suppose if the user enter into through Putty SSH. He should have access only to home folder and cannot move to other than $HOME. User should not able to root files and /$ files. Kindly provide solution. Regards Vasanth kumar (3 Replies)
Discussion started by: vasanthrj
3 Replies

8. UNIX for Dummies Questions & Answers

size of a folder ?

hi, is possible to calculate the size of a folder using ls ? ls -s works only for files.. thanks (2 Replies)
Discussion started by: aneuryzma
2 Replies

9. Shell Programming and Scripting

operation on a folder level

hi, need help in writing a script in perl. requirement : 1. Search for the files in a particular folder 2. search for a string in the file names 3. Delete the file which matches the string. Ex: if the folder is C:\TEST and the folder has 5 files like 2009ABCG.txt 2009MNO.txt... (2 Replies)
Discussion started by: adityamahi
2 Replies

10. UNIX for Dummies Questions & Answers

Need help in finding Folder Size

Hi, I would like to find the size of a folder. When I run the command du -k It is going through all the sub-folder and files and taking really much time. Is there any command to get the complete directory size without showing the sub-folder and file size. Appreciate your response. ... (3 Replies)
Discussion started by: TonySolarisAdmi
3 Replies
Login or Register to Ask a Question