LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 01-05-2005, 10:59 AM   #1
mikemrh9
Member
 
Registered: Nov 2003
Distribution: Arch
Posts: 136

Rep: Reputation: 21
directory size listing with ls


Hi.

I'm trying to get 'ls' to show me the total size of a directory. ls -l just gives the directory entry size, but not the cumulative size of the files contained within it.

I can't see anything in the man page. Any ideas, please?
 
Old 01-05-2005, 11:16 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

To my knowledge this cannot be done with ls, take a look at du (du -s).

Hope this helps.
 
Old 01-05-2005, 12:04 PM   #3
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 682

Rep: Reputation: 62
There is ls -dl but I don't think it shows you size.
I would use this instead in the directory:
du -h --max-depth=1
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing Directory Size andy7t Linux - Software 2 12-14-2008 02:46 PM
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
directory listing script linuxzouk Programming 2 06-04-2004 12:07 PM
listing files in a directory Linh Programming 7 05-17-2004 04:35 AM
Directory Listing mattbeekler Linux - Software 8 07-22-2003 02:27 PM


All times are GMT -5. The time now is 10:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration