LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-17-2007, 09:55 PM   #1
veeruk101
Member
 
Registered: Mar 2005
Distribution: Ubuntu 12.04 LTS
Posts: 249

Rep: Reputation: 16
Total size of directory and zipped files


How can I get the total size of all files, subdirectories, sub-files of a given folder? I tried "du -c" but that doesn't give one total, it still gives the individual sizes of all files...

Also, how can you find out the decompressed size of compressed files, for both .gz and .bz2, without having to actually decompress them first?

Thanks.
 
Old 07-17-2007, 10:32 PM   #2
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by veeruk101
How can I get the total size of all files, subdirectories, sub-files of a given folder? I tried "du -c" but that doesn't give one total, it still gives the individual sizes of all files...
you can try this:
Code:
du -ha
Quote:
Also, how can you find out the decompressed size of compressed files, for both .gz and .bz2, without having to actually decompress them first?

Thanks.
there's a -l option you can experiment in gzip. Not sure for bz2 files though. you have to check the man for that.
 
  


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
BASH : Total directory size xgreen Programming 7 03-04-2013 05:33 AM
How to find grand total size of all files in a directory fakhrul Red Hat 4 04-17-2010 12:28 AM
finding size of total files in a directory blackzone Linux - Newbie 3 01-07-2005 03:01 AM
How to list total file size of a directory phil1076 Linux - General 3 12-18-2003 03:47 PM
To know the size of all files in a directory ganninu Linux - General 6 08-01-2003 12:33 PM

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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration