Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all! I have a complex directory with tonnes of *.mp3 files. And I wanted to know the summation of the file sizes of all mp3 files under my MP3 ...
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    6

    Cool Help finding cumilative size of files under directory

    Hi all!

    I have a complex directory with tonnes of *.mp3 files. And I wanted to know the summation of the file sizes of all mp3 files under my MP3 directory, which is structured as follows:

    Where: MP3 is the root directory, A, B, C, C1 and C2 are directories and *.mp3 are the files I want to add.

    MP3
    ->A
    ->a.mp3
    ->aa.mp3
    ->B
    ->b.mp3
    ->bb.mp3
    ->C
    ->C1
    ->c1.mp3
    ->cc1.mp3
    ->C2
    ->c2.mp3
    ... etc


    Cheers,

    Thanks!

    P

  2. #2
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    In a terminal window:

    cd /where/your/files/are

    du -ch


    will produce a grand total of the size of all files in the current and sub directories.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...