LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-03-2005, 03:26 AM   #1
Jeozp
Member
 
Registered: Dec 2004
Distribution: Debian
Posts: 40

Rep: Reputation: 15
Confusing "ls -lh" output


When I try to chek the size of a directory on my Debian box they are all 4.0k large, all of them even the ones that are empty. How can that be? Is there a specific arguument I have to give to ls? I can't use any GUI on this machine so I cant check how it would look like in Gnome or KDE.
All of my parttitions are ext2 if that metters.
 
Old 02-03-2005, 03:59 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
"ls -s"

or

"du -a"

maybe
 
Old 02-03-2005, 04:03 AM   #3
Cydizen
LQ Newbie
 
Registered: Feb 2005
Location: AZ, USA
Distribution: Slackware 10 | 2.6.7(custom compiled) | Enlightenment E16 / DR17
Posts: 11

Rep: Reputation: 0
Hi Jeozp,

Here is what I do. I am sure there are other ways, but this works for me.

If I want to see the size of my /home/bruce directory, this is the command I would run:

du -sh /home/bruce (substitute with your own user)

The alternative is you could run that command from the directory of which you need this size:

cd /home/bruce
du -sh

Another alternative is if you want to see how subdirectories break down, just run

du -s /home/bruce

The last line of that result will be the total for all the directories.

Hope this helps,

Cheers,
Bruce
 
Old 02-03-2005, 04:08 AM   #4
Cydizen
LQ Newbie
 
Registered: Feb 2005
Location: AZ, USA
Distribution: Slackware 10 | 2.6.7(custom compiled) | Enlightenment E16 / DR17
Posts: 11

Rep: Reputation: 0
by the way, the "h" make the output "human readable"

exp: 297613 or with 'h' 291M


-B
 
Old 02-03-2005, 04:27 AM   #5
Jeozp
Member
 
Registered: Dec 2004
Distribution: Debian
Posts: 40

Original Poster
Rep: Reputation: 15
Thx all, it helped
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
"User CP" label confusing to Newbies ... Simon Bridge LQ Suggestions & Feedback 36 06-11-2005 02:41 PM
Can I redirect script output to a file without ">> $LOGFILE" at the end of each line davee Linux - General 1 12-19-2003 05:01 AM
a confusing problem about "join" hyo77 Programming 1 11-18-2003 02:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:39 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