Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 07-18-2006, 04:38 AM   #1
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68

Rep: Reputation: 15
View directories size

Dear all,

I have one questions, how do i able to view the size of a directory?

Eg: When i am trying to view the size of all directories inside /home by using ls command, i only got the size 4096 for all the users which is not correct (As shown below)

drwx------ 3 andrew andrew 4096 May 17 07:14 andrew/
drwx------ 3 anita anita 4096 May 17 07:14 anita/
drwx------ 3 anne anne 4096 May 17 07:14 anne/
drwx------ 3 annie annie 4096 May 17 07:14 annie/

Please advice

Many Thanks

Old 07-18-2006, 04:50 AM   #2
LQ Newbie
Registered: Feb 2006
Location: Netherlands
Distribution: Mint 17 mate
Posts: 18

Rep: Reputation: 0

du -ch --max-depth=1 /home

Regards, Hans.
Old 07-18-2006, 08:06 PM   #3
Registered: Jan 2006
Location: Malaysia
Distribution: RedHat & FreeBSD
Posts: 68

Original Poster
Rep: Reputation: 15
Yeah!!, that's what i need!

thanks a lots pal!..


Old 07-18-2006, 11:24 PM   #4
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 128Reputation: 128
By the way, ls shows the space used by a single entry, not recursive data. 4096 bytes (one block) are used for each directory entry.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ls to view directories only mikemrh9 Linux - Newbie 26 07-08-2015 01:27 PM
How to view those .directories thort Linux - Newbie 3 02-12-2006 12:37 PM
directories size is always 4K Milosevic Linux - Newbie 7 12-10-2005 05:59 PM
check the used size of the directories ust Linux - Software 2 02-02-2005 06:47 AM
How to view directories through putty of a server jai_linux Linux - Software 2 07-10-2004 02:04 PM > Forums > Linux Forums > Linux - General

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

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