Download your favorite Linux distribution at LQ ISO.
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 01-06-2006, 01:35 PM   #1
Registered: Jan 2003
Location: New Mexico
Distribution: SuSE 9.2 Professional, OpenSuSE 10.1 64 bit, Open SuSE 10.2, Debian Etch
Posts: 535

Rep: Reputation: 30
sum total of file sizes

I have a directory structure that i want to get the sum total of disk space it is occupying
I don't see anything in the ls command.
How do i do this?

ls -R -?

...oh, maybe du

Last edited by allelopath; 01-06-2006 at 01:43 PM.
Old 01-06-2006, 01:50 PM   #2
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
As you guessed, du will do it.
Old 01-06-2006, 05:28 PM   #3
LQ Newbie
Registered: May 2004
Posts: 13

Rep: Reputation: 0
du --max-depth=1 -h

... will probably do exactly what you want.
Old 01-07-2006, 08:30 AM   #4
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 232Reputation: 232Reputation: 232
du -sh .

This will print the total size of the pwd your currently in without seeing every single file printed and scrolling on your screen.


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
Linux file sizes (shell) Zeno McDohl Linux - General 8 06-03-2005 07:18 AM
reiserfs file sizes doralsoral Linux - Software 1 01-19-2005 03:52 PM
DVD File Sizes Maestro485 Linux - Software 1 12-21-2004 07:41 PM
samba limit on file sizes about 2GB adler321 Linux - Software 7 09-22-2004 07:59 AM
How big is Ximian Desktop (file sizes)? azebuski Linux - Software 1 03-09-2004 02:03 PM

All times are GMT -5. The time now is 03:33 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration