I am writing a php script and I need to find the total diskspace of a directory. I have used space already. I have a couple of different users with quotas
Code:
$path = "/home/" . ($_SERVER['PHP_AUTH_USER']);
$used = exec("du -c -a $path");
echo $used;
Will give me the disk space used. But I need total quota for that user.
Is there a way to set a disk quota for samba users? I've found a few guides, but they were a little to complicated for my needs. Running Ubuntu server 9.10
When going through my emails that are produced by the cron jobs ran on my Solaris servers, I am receiving a message that states,"/ is 50% full" what can I do to either lower the amount of data on this partition or raise the threshold limits to to stop this message? I would prefer to learn how to lower the amount of data on this disk to bring under my disk quota of 50% in order to stop these emails being produced by the cron job running on this server.
What is the best way to create a hard (OS) quota on disk space folders? Basically in web root folder /var/www/lighttpd I have a folder called domains. I want to set a quota on each domain folder. The quota sizes will vary per folder. Is there a way to do this without creating a user for every domain? Currently every folder is owned by the lighttpd user and group.
I installed Diskquota on CentOS 5.1 machine. I enabled quota for some user with 1 GB as both hard and soft limits, Grace period is 0. Every this is working fine if we work from normal user's login say (user1 who is a system user). If he exceeds 1GB its will restrict that saying quota exceeded. But, If root user copies some 500MB files into his workspace, and change the ownership of those files using following command chown user1.user1 * ( * is 500 MB files).
Then quota is exceeded and it is showed using: repquota /home user1 +- 2039960 997020 997020 none 298 0 0 Here its showing as some 2GB. Soft limit is 951 MB.
So, my problem is restrict quota from all possible ways, i.e., even if root does some copying and change permissions, it must tell that disc quota exceeded.
In our organization there are around 1000+ users are using mails. The mailing system is implemented under RHEL using postfix and dovecot. For user based quotas i have implemented Disk Quota. But the problem when i want to edit quota for multiple users with similar limits i'm doing "edquota user" for every users. It seems very difficult. Now I wanna know:
1. Is there any way to edit quota value for multiple users at a single shot?
2. Also there is any method to send alerts mail to the end users on disk utilization?
We are using Red Hat Enterprise AS 3.0. There are 100+ users connected to a single server. As the Inbox size of Mail Client (Thunderbird) for each user grows there are space constraint on the server. So I want to define a quota on mail folder for each user (say around 500 MB to 1 GB). How can I do this.
Running a server using CentOS 5.5 (yum updated, x86_64), found that when using /usr/sbin/useradd to create system user, the quota for the user will default set to 5M soft and 10M hard (on /var/spool/mail partition). As remember the default setting for user quota should be both zero when create a new user.
man useradd and quota related command and no help, had any idea how to change/set the default quota when create user.
I'm looking for a free backup solution how work in client-server in both environments Linux(server) and Windows(client). in my case, i want to give a disk space quota in my Linux server for each remote windows client.
Relational databases usually have their data over in /var/lib/something. Users are in /home (with data in /var/www). How can I apply a single total disk space quota across all of these independent software systems (file systems, RDBMS, etc.)?
P.S. There's a bet going on around me as to just how awesome SU is. Let's see what you've got.
what are the series of files that are called when a user make copy operation from usb mass storage to hard disk?i have reached the code of the usb mass storage in linux kernel 2.6.33 and i want the exact code the make the copy how can i do that?
I'm having problems adding up column totals using arrays. I've got it to add up the row totals and display at the end of the row. Here is my code so far
Code:
#include <stdio.h> #include <string.h> const int maxrows=10;
[code]...
What i need it to do is, add up the columns and display it at the bottom of each column similar to how the row totals display
While installing OS, in partition window after OS file system structure I've left 277 GB. But after installation it shows Size - 255GB and available disk space is 242 GB.
Isn't it weired? How can I use the total amount of space in Linux? I need the whole 277GB exactly. What should be my workaround?
I thought there exists a built-in function that gives total size of a list object in byte. So using the function produces 1 for a1, 3 for a2. I haven't found such function or module yet.
I am trying to write a script to calculate the total amount of installed memory to use during an anaconda kickscript, so the swap file is created at 2 x the installed memory. I so far have the amount of installed RAM DIMMS but need a way to total them up and produce a varible I can use in the pre section of the install.
Note: on some servers there could be from 1 DIMM up to 16 DIMMS installed so the script needs to be able to handle this. I also can not use bc as it does not exist during the install stage. I am guessing I need a while loop to do this and use expr but do not know where to start for this logic.
I recently started shell programming and my task now is to do a menu display.Currently i am stuck whereby user will input both title and author and it will delete it.