LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 11-16-2005, 01:27 PM   #1
grobarusrcu
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
diskwatch.sh


can someone please help me i need this for my school.

How can i calculate how many users have home directories over a specific size and flag those users in the report, or list all files in /tmp that are over 60 days old

here's the script the base script

#!/bin/bash

# diskwatch.sh
# script to create/mail disk reports

echo -e "From: Disk Usage Monitor <devnull@localhost>
Subject: Disk usage on / on `date`
To: <root@localhost>

FILESYSTEM USAGE:
`/bin/df`

USAGE IN /home:
`/bin/du -h -s /home/*`

USAGE IN /tmp:
`/bin/du -h -s /tmp`
" | /usr/sbin/mail root

i dont know how to upgrade it to calculate how many users have home directories over a specific size and flag those users in the report, or list all files in /tmp that are over 60 days old

Thanks in advance
 
Old 11-16-2005, 01:38 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

http://www.linuxquestions.org/questi...hreadid=383724

In this case I have closed the original (3 minutes older) because the Programming
forum seems more appropriate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
diskwatch.sh grobarusrcu Programming 2 11-16-2005 01:45 PM


All times are GMT -5. The time now is 11:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration