- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to set a quotum on a directory
Operating System - HP-UX
1752790
Members
6202
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2001 05:35 AM
тАО02-21-2001 05:35 AM
how to set a quotum on a directory
Hello,
I am working with a HP11.0 UNIX machine and I want to restrict the HOME-directory for users.
In a script I want to set a quotum of 10 MB on the /home/'username'-directory, so when the user passed this limit they get a notification (or something else).
Does somebody know how to get this in a script?
Bye,
Erwin
I am working with a HP11.0 UNIX machine and I want to restrict the HOME-directory for users.
In a script I want to set a quotum of 10 MB on the /home/'username'-directory, so when the user passed this limit they get a notification (or something else).
Does somebody know how to get this in a script?
Bye,
Erwin
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2001 05:54 AM
тАО02-21-2001 05:54 AM
Re: how to set a quotum on a directory
hi,
To enable quotas on /home:
=======================================
# touch /home/quotas
# vi /etc/fstab # add quota in the filesystem options
/dev/vg00/lvol11 /home hfs rw,suid,nolargefiles,quota 0 2
# quotaon /home # if you want the quotas to take effect now instead of reboot, alternatively un-mount and re-mount /home
# edquota username
=======================================
As for the script,
=======================================
#!/sbin/sh
cd /home
for user in *
do
usage=`quota -v |tail -1|awk '{print $2}' `
limit="10240"
if [ "$usage" -gt "$limit" ]
then
echo "You have exceeded the 10 MB quota!!! Please kindly trim your home directory." | write $user
fi
done
=======================================
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
To enable quotas on /home:
=======================================
# touch /home/quotas
# vi /etc/fstab # add quota in the filesystem options
/dev/vg00/lvol11 /home hfs rw,suid,nolargefiles,quota 0 2
# quotaon /home # if you want the quotas to take effect now instead of reboot, alternatively un-mount and re-mount /home
# edquota username
=======================================
As for the script,
=======================================
#!/sbin/sh
cd /home
for user in *
do
usage=`quota -v |tail -1|awk '{print $2}' `
limit="10240"
if [ "$usage" -gt "$limit" ]
then
echo "You have exceeded the 10 MB quota!!! Please kindly trim your home directory." | write $user
fi
done
=======================================
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2001 07:11 AM
тАО02-21-2001 07:11 AM
Re: how to set a quotum on a directory
Hi Erwin,
This is how I proceed:
1) Activate the quota file:
cpset /dev/null /home quotas 600 root bin
2) Create a model quota:
edquota berridge
This will invoke vi, that you will have to modify:
fs /home blocks (soft=0 hard=0) inodes (soft=0 hard=0 )
e.g.:
fs /users/ocpa blocks (soft = 10000, hard = 12000) inodes (soft = 260, hard = 320)
3) To use the quota just fixed for the users
edquota -p berridge
Good luck
Best regards
Victor
This is how I proceed:
1) Activate the quota file:
cpset /dev/null /home quotas 600 root bin
2) Create a model quota:
edquota berridge
This will invoke vi, that you will have to modify:
fs /home blocks (soft=0 hard=0) inodes (soft=0 hard=0 )
e.g.:
fs /users/ocpa blocks (soft = 10000, hard = 12000) inodes (soft = 260, hard = 320)
3) To use the quota just fixed for the users
edquota -p berridge
Good luck
Best regards
Victor
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP