LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-03-2006, 09:31 AM   #1
riwaJR
Member
 
Registered: Mar 2006
Location: Lund, Sweden
Distribution: Arch, Slack
Posts: 51

Rep: Reputation: 16
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?
 
Old 04-03-2006, 11:06 AM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
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
 
Old 04-03-2006, 11:29 AM   #3
riwaJR
Member
 
Registered: Mar 2006
Location: Lund, Sweden
Distribution: Arch, Slack
Posts: 51

Original Poster
Rep: Reputation: 16
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
 
Old 04-03-2006, 12:00 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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..
 
Old 04-03-2006, 01:16 PM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connection reset after 4096 bytes when using FTP to access remote server socrates71 Linux - Networking 2 10-20-2005 08:37 AM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 12:23 PM
TX bytes vs. httpd bytes ovrload Linux - Networking 3 10-12-2005 04:19 PM
ls -la 4096 mikeshn Linux - General 4 08-31-2003 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration