LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Directories always 4096 bytes? (https://www.linuxquestions.org/questions/debian-26/directories-always-4096-bytes-431329/)

riwaJR 04-03-2006 09:31 AM

Directories always 4096 bytes?
 
I can't read the disk usage with the ls -l command. It only shows the disk usage of the actual DIR not what's in it. How can I change that?

jonaskoelker 04-03-2006 11:06 AM

looking through `man ls`, I don't think it's possible.

You say directories always take up 4K. My experience--with a ReiserFS partition--is different. Which FS are you using?

Also, computing the value you ask for (recursive sum of size of contents) takes quite a while. Have a look at what `du' can do for you.

hth --Jonas

riwaJR 04-03-2006 11:29 AM

I use this regular FS called (ext3??) I think. Yeah I know I can 'du' it but I ('m definately not sure) think I could do that in Ubuntu. I don't bother to much it'd be nice though...

Thanks for the info..

/Richard

farslayer 04-03-2006 12:00 PM

A couple options.. Disk Usage

df -h

du -sh /[!d,p]*

du -h /|sort -r|more

du -h /|sort -n



possibly one of those will suit your needs..

nx5000 04-03-2006 01:16 PM

Quote:

Originally Posted by farslayer
A couple options.. Disk Usage

df -h

du -sh /[!d,p]*

du -h /|sort -r|more

du -h /|sort -n



possibly one of those will suit your needs..

Hum
Code:

du -h | sort -n
is not so nice!!
If somebody knows (I'm sure I've seen it somewhere) how to sort number with M,G,.. I'm intersted.
You would replace it by:
Code:

du -ks * | sort -n
or
Code:

du -ksx * | sort -n


All times are GMT -5. The time now is 11:00 AM.