GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Simple Admin Question (https://gfy.com/showthread.php?t=406999)

TheJimmy 12-22-2004 09:53 PM

Simple Admin Question
 
I know how to find out basic space utilization on a box with the

df -k command

but how do I find out what /usr (s) are taking up the most space without having to dig through all their folders ?


thanks in advance...

Andrew-at-ENet 12-22-2004 09:54 PM

if you wanna know what inside /usr is taking the most space...do

du -ks `ls /usr/`

If you mean users...then thats

du -ks `ls /usr/home/`

or

du -ks `ls /home/`

*edited to fix command*

TheJimmy 12-22-2004 10:05 PM

Quote:

Originally Posted by Andrew-at-ENet
if you wanna know what inside /usr is taking the most space...do

du -ks `ls /usr/`

If you mean users...then thats

du -ks `ls /usr/home/`

or

du -ks `ls /home/`

*edited to fix command*


awesome! thanks mang....totally appreciate that...gotta find out who's jonesin all this space...damm pack rats.... ;)

fris 12-22-2004 10:06 PM

or you could have just typed df -H

will tell you what partitions how big each are

Andrew-at-ENet 12-22-2004 10:08 PM

Quote:

Originally Posted by fris
or you could have just typed df -H

will tell you what partitions how big each are

Don't think that's the details he's lookin for

Andrew-at-ENet 12-22-2004 10:08 PM

Quote:

Originally Posted by TheJimmy
awesome! thanks mang....totally appreciate that...gotta find out who's jonesin all this space...damm pack rats.... ;)

No problem, invoice is in the mail :xmas-smil

TheJimmy 12-22-2004 10:22 PM

Quote:

Originally Posted by Andrew-at-ENet
No problem, invoice is in the mail :xmas-smil


it's kinda working but not really giving me the list of users and how much each account is using :(

is this for linux boxes or will it also work on freebsd?

sorry for having misplaced all my clues tonight :)

Andrew-at-ENet 12-22-2004 10:23 PM

Quote:

Originally Posted by TheJimmy
it's kinda working but not really giving me the list of users and how much each account is using :(

is this for linux boxes or will it also work on freebsd?

sorry for having misplaced all my clues tonight :)

You need to basically execute the du -ks `ls`

On the directory that contains all the users home directories. That'll give you how much each directory has... a quick sort on that would give you the top users.

It should work on Linux & FreeBSD & Solaris

TheJimmy 12-22-2004 10:26 PM

Quote:

Originally Posted by Andrew-at-ENet
You need to basically execute the du -ks `ls`

On the directory that contains all the users home directories. That'll give you how much each directory has... a quick sort on that would give you the top users.

It should work on Linux & FreeBSD & Solaris


when I run the commands I get this:



su-2.04# du -ks 'ls'
du: ls: No such file or directory
su-2.04# du -ks 'ls /usr/home/'
du: ls /usr/home/: No such file or directory


and trust me, those files/directories exist

Andrew-at-ENet 12-22-2004 10:27 PM

Quote:

Originally Posted by TheJimmy
when I run the commands I get this:



su-2.04# du -ks 'ls'
du: ls: No such file or directory
su-2.04# du -ks 'ls /usr/home/'
du: ls /usr/home/: No such file or directory


and trust me, those files/directories exist

you're using ' instead of `

There's a difference.


All times are GMT -7. The time now is 04:20 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123