Hmmm... I was hoping to see how this command would be used in the context of a script, where the script would generate and deliver the report to a particular file every monday morning.
Main Topics
Browse All TopicsI need an assist with a task I've been given to write a script. The script needs to report the status of user disk quotas. The report will show the quota amount allocated, the usage in Mb and percentage of quota used. The script will execute every Monday morning and place the report into a directory called Monday Reports/Disk Usage. While I do not want someone to write the script for me, i would like someone to show me a similar script, so I can see the format and how it's laid out, and I can just enter the appropriate commands in the format demonstrated.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
you may have these commands in a shell script that you run on Mondays. Put
/path/to/quota username >> /path/to/script.log
OR
/path/to/repquota filesystem >> /path/to/script.log
in script, call it myscript
make it executable
chmod +x myscript
then add a crontab job, e.g.
0 2 1 * * /path/to/myscrip
To add crontab job:
EDITOR=vi ; export EDITOR
crontab -e
add the line above, save and exit
The crontab job will run every Monday at 2:00 AM
Ok, so, i'm basically going to take an existing shell command REPQUOTA and i'm going to package it up in a script that will direct it's output to my.... let's call it /Home/Joe/Monday Reports/Disk Usage directory. The crontab will execute the script every monday at 2 am
So, that would be... vi to open text editor...
#!/bin/bash
repquota -a >> /home/Joe/Monday Reports/Disk Usage
and I don't know how to do the crontab thing. Am I on the right path?/ i'm very nearly out of time on this...
Business Accounts
Answer for Membership
by: omarfaridPosted on 2008-08-15 at 21:56:39ID: 22243159
You need to use the commands quota or repquota:
/quota /repquota
http://linux.die.net/man/1
http://linux.die.net/man/8
the quota system needs to be enabled on the file system you want quota reported