LinuxQuestions.org
Visit Jeremy's Blog.
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
  Search this Thread
Old 05-17-2004, 04:17 AM   #1
meshcurrent
Member
 
Registered: Oct 2002
Posts: 38

Rep: Reputation: 15
Total File Size


`du` reports the total disk usage of the contents of a directory, but is there a way to report the total actual file size of the contents of a directory, which is independent from the file system block size? `ls` does that but not recursively.

Youssef Eldakar
Bibliotheca Alexandrina
 
Old 05-17-2004, 03:09 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Code:
ls -Rl
?
Or do you want the sum?
Code:
ls -Rl | awk '{total += $5 }; END { print "Bytes total is", total} '


Cheers,
Tink

Last edited by Tinkster; 05-17-2004 at 03:12 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH : Total directory size xgreen Programming 7 03-04-2013 06:33 AM
Any fast way to know the total file size under a folder gsbarry Linux - General 15 06-22-2010 09:42 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 01:55 PM
Command to find total file size satimis Linux - Newbie 1 01-22-2004 12:19 PM
How to list total file size of a directory phil1076 Linux - General 3 12-18-2003 04:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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