Results 1 to 2 of 2
  1. #1
    gatorparrots
    Guest
    You can easily find the disk usage by file type with this simple one-liner command.
    sudo find / -name "*.mp3" -print0 | xargs -0 du -ck
    This will calculate the disk usage of all of your mp3 files.

    To make it more fun, throw an alias into your .*shrc file like so:
    alias diskspc 'sudo find / -iname "*\!:1*" -print0 | xargs -0 du -cks'
    This will net you the ability to search for any file type. For example issuing,
    diskspc .tif would return the filesize for every tiff file, whether its extension .tif, .TIF, .tiff, or .TIFF.
    (Note the case insensitivity provided by the -iname flag. Very handy for this application.)

    Also, if you have fileutils installed, replace the flag on du with this one: du -chs
    This will return the results in human-readable MB, instead of KB.

  2. #2
    Kris
    Guest
    Originally posted by gatorparrots@Dec 23 2002, 09:34 PM
    sudo find / -name "*.mp3" -print0 | xargs -0 du -ck
    This will calculate the disk usage of all of your mp3 files.
    Very neet, thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hard disk usage
    By jdstevo in forum Apple Desktops
    Replies: 8
    Last Post: 03-02-2014, 11:09 AM
  2. iPhoto disk space usage
    By GMRMSx32767 in forum Images, Graphic Design, and Digital Photography
    Replies: 2
    Last Post: 11-02-2010, 06:00 AM
  3. OS 10.6 $29 Disk & Appropriate Usage
    By pigoo3 in forum OS X - Operating System
    Replies: 2
    Last Post: 08-29-2009, 02:28 AM
  4. Disk Usage?
    By LEOVAN83 in forum iPod Hardware and Accessories
    Replies: 1
    Last Post: 06-06-2008, 06:15 PM
  5. Hard Disk space usage
    By mapexvenus in forum OS X - Operating System
    Replies: 1
    Last Post: 10-12-2007, 04:38 PM

Posting Permissions

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