sloopy on 30 May 2009 02:21:38 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] find the user with the most files


On Mon, 2009-05-04 at 18:49 -0400, Michael Lazin wrote:
> Hi, I'm in a directory containing directories that belong to different
> users and we are trying to get users to reduce their disk use to make
> our backup servers run better.  
> 
> I tried 
> 
> find . | egrep -i "\.(zip|mkv|mp3|avi|rar|exe|iso|wma|wmv|mpg|mpeg|
> nfo|r[0-9]+)$"|less
> 
> In this directory and noticed a lot of these users have warez, but we
> don't have the time or the manpower to go after every user that has
> warez.  What I want to do is find every directory of a certain name
> and output the size of that directory to see who the biggest culprits
> are.  Any suggestions?  
> 
> Thanks.    
> 
> -- 
> Michael Lazin
> 

i know this is a little late but i usually use

 du -ah --max-depth=1

lists all files and directorys with file sizes in human readable (K,M,G
suffix) in my profile i have it set as an alias to duf in most of my
machines. out put would look like this:

root@evo:/home# ls
mythtv  share  sloopy
root@evo:/home# duf
du: cannot access `./sloopy/.gvfs': Permission denied
9.1G	./sloopy
4.0K	./mythtv
11G	./share
20G	.
root@evo:/home# 

sloopy.


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug