LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   User space used (https://www.linuxquestions.org/questions/programming-9/user-space-used-64910/)

grub 06-11-2003 12:59 AM

User space used
 
How can I get the amount of space used by a user on a particular file system or partition.

I know 'du -s /dir' gives the summary for '/dir'
and 'du -s /home/user' gives the summary for user directory.

But when I run the script as root, I may not be able to enter the directories which have permission 400.

Is there any command or System Call or patch to do this.

This is to be done without enabling quota.

Thanks
Grub

joesbox 06-11-2003 01:04 AM

try
Code:

dh -h
the -h represents human readable.

grub 06-11-2003 01:12 AM

what does dh stands for.

grub 06-11-2003 01:15 AM

Requirement is to find the disk usage of the user(s) on the file system(s).

GtkUser 06-11-2003 01:16 AM

Type in : df

fancypiper 06-11-2003 01:25 AM

#Run from the directory in question and the largest chunk shows up last
find $1 -type d | xargs du -sm | sort -g

joesbox 06-11-2003 03:36 AM

sorry my stupid should be df -h not dh -h


All times are GMT -5. The time now is 03:08 AM.