Finding largest files

Hi Guys,
I have a situation where i  have multiple home drives on a share. i want to list their largest (size) files with their parent folder names (this usually is their username), so i know which user is consuming more space and also it would be good to point
out their largest files so they can either delete or other arrangements are organised. It would be nice to get a spreadsheet with the results.
I know it can be done with each of those homedrives which is time consuming task and i know powershell can do that quicker so i hope some has an answer! 
-mEtho

Thanks very much for the replies. Following is the script which basically scans all the "Home Drives" and produces a nice list with the name/location and size. with that i can find out who is using most of the space.  
function Get-FolderLength
# Usage: Get-FolderLength.ps1 D:\Homedirs
param ( [Parameter(Mandatory=$true)] [String]$Path )
$FileSystemObject = New-Object -com Scripting.FileSystemObject
$folders = (Get-Childitem $path | ? {$_.Attributes -eq "Directory"})
foreach ($folder in $folders)
$folder | Add-Member -MemberType NoteProperty -Name "SizeMB" –Value(($FileSystemObject.GetFolder($folder.FullName).Size) / 1MB)
$folders | sort -Property SizeMB -Descending | select fullname,@{n=’Size MB’;e={"{0:N2}" –f $_.SizeMB}}
That scripts only scans the Directories. Next i would like to scan each of those home drives and list only top 10 or 20 biggest files. so i can inform users about those big files. 
Example: 
Directory 1 
Directory 2
Directory 3
Directory 4
i want to scan each of those directories to find which files are using most space. A nice output with directories names and most space consuming files would be great (csv).  
Any help would be much appreciated!

Similar Messages

  • How to list the top 10 largest files in the current working directory ?

    How can I list the top 10 largest files in the current working directory in Solaris ?

    execute below....to get the large files in order.. change the <FS>
    find /<FS> -type f -size +1024 -ls | awk '{print $11, $7}' | sort -rn +1 | awk '{print $1, $2/1024/1024 "MB"}' | /bin/more

  • IBook need a diet. How to find biggest files/folders?

    Hi -- this may seem like a silly question, but is there a way to search for the largest files/folders on my iBook (latest version of Tiger)? I'd like to find the offending bloat and get rid of it.
    A couple of weeks ago, I had 20GB left, now I've got 14GB, and I don't know what I've done to get there. I've done the "get info" thing on various folders, but haven't found any that are particularly bloated.
    Is there an app (preferably freeware, natch.) that can search for apps/files/folders by size? Or is this a capability that's already in Tiger?
    Thanks!

    You can also use Terminal to find big directories.
    The following command finds the top-10 directories:
    du -S | sort -nr | head
    Please note that I am using the fink version of du.
    Dual G5 @ 2GHz   Mac OS X (10.4.5)  

  • Finding large files

    Hi,
    Over the last couple of weeks I seem to have lost 30gigs of space on my home drive. I'm now down to 6G free and its starting to hang. (snow leopard with 300gig drive).
    Is there a utility for visualizing which folders have largest files, or for finding big new files. I don't know where the space has gone and have looked into a few obvious folders, but haven't found anything obvious to delete or clean up...
    Any ideas or utilities to recommend?
    Eric

    Try OmniDiskSweeper or WhatSize - VersionTracker or MacUpdate.

  • Write the sql query to find largest value in row wise without using   great

    write the sql query to find largest value in row wise without using
    greatest fuction?

    Another not so good way, considering you want greatest of 4 fields from a single record:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (Select 100 col1,200 col2,300 col3,400 col4 from dual
      2  union select 500,600,700,800 from dual
      3  union select 900,1000,1100,1200 from dual
      4  union select 1300,1400,1500,1600 from dual
      5  union select 1700,1800,1900,2000 from dual
      6  union select 2100,2200,2300,2400 from dual
      7  union select 2800,2700,2600,2500 from dual
      8  union select 2900,3000,3100,3200 from dual)
      9  SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) Max_value
    10  FROM
    11  (SELECT (CASE WHEN col1_col2 > col2_col3 THEN col1_col2 ELSE col2_col3 END) col1,
    12         (CASE WHEN col2_col3 > col3_col4 THEN col2_col3 ELSE col3_col4 END) col2,
    13         (CASE WHEN col3_col4 > col4_col1 THEN col3_col4 ELSE col4_col1 END) col3
    14  FROM
    15  (SELECT (CASE WHEN col1 > col2 THEN col1 ELSE col2 END) col1_col2,
    16         (CASE WHEN col2 > col3 THEN col2 ELSE col3 END) col2_col3,
    17         (CASE WHEN col3 > col4 THEN col3 ELSE col4 END) col3_col4,
    18         (CASE WHEN col4 > col1 THEN col4 ELSE col1 END) col4_col1
    19* FROM t))
    SQL> /
    MAX_VALUE
           400
           800
          1200
          1600
          2000
          2400
          2800
          3200
    8 rows selected.
    SQL> Edited by: AP on Sep 21, 2010 6:29 AM

  • Help:Can not find the file in jar!

    Hello everyone:
    I build a project using Netbeans 5.0 and make a jar file with it...
    The code in the project as follows will throw an exception described that it can not find the file named datasource-config.xml
    String dataFilePath = getClass().getResource(dataFile).getPath();
    //System.out.println("filepath:"+dataFilePath);
    InputStream input = new FileInputStream(dataFilePath);
    when I run the project with the main() function as an entry it works perfectly and output:
    filepath:/C:/projects/java_project/search/build/classes/com/cn/wxjt/lucene/config/datasource-config.xml
    But when I compressed the project with jar and run it , it will show:
    filepath:file:/C:/projects/java_project/search/dist/search.jar!/com/cn/wxjt/lucene/config/datasource-config.xml
    there is a (!) between search.jar and /com/cn/wxjt...
    I dont know why I generate a ! symbol in the file path... Is it cause the exception->
    java.io.FileNotFoundException: file:\C:\projects\java_project\search\dist\search.jar!\com\cn\wxjt\lucene\config\datasource-config.xml
    If you have any idea, plz tell me.
    Thank you and best wishes to you !
    :)

    If the file you want to read is in your jar file, use
    getClass ().getResourceAsStream
    (relative_path_file_name)Hope that help,
    Jackhey jack i want to open the file as new File
    i m using this.getClass().getResource("resource/backend.xml");
    the resource is the directory inside the jar file.
    when i prints the url it shows:
    the jar file is in the WORK directory
    URL : jar:file:/home/neeraj/WORK/show.jar!/resource/backend.xml
    now when i creates new File using the url.getFile() method the file does not exist.
    although the same programs runs well when i uses the InputStream
    so plz tell me cant I create a new File from the above method????
    thanks in advance
    with regards
    neeraj

  • Move all my music to another folder but Itunes can't find the files!

    I have all my music on my desktop in small folders for each artist.
    But now i don't have room anymore, because i have to much music.
    So i want to move it all in to a folder called "Music". But when i do that
    Itunes can't find the files, and i have to search for each file, to find the new location instead of the desktop. How do i move my music more easily? So i don't have to synchronize it all in again, with the right album covers and that..
    Please, need some help here!

    You need to open your preferences file in iTunes and click on advance then select the location of where you put the folder.  http://support.apple.com/kb/HT4527

  • I have updated my iphone software from ios4.1 to 5.0.1(9A405) through itunes and i want to find the file which i download but i can`t find it in itunes where can i find it

    I have updated my iphone softwarefrom ios4.1 to 5.0.1(9A405) and i want to jailbreak my iphone to download cydiaafter i do that i download programe named sn0wbreeze2.8b11 but when i startedto jailbrake the programe ask me to drag&drop or browse for ipsw while ialready downloaded but through itunes i try to search on itunes store to get itand drag on this programe but i didn`t found it so, Kindly please tell me howcan i find this file to continue jailbreak my iphone if u have an answer to myproblem please e-mail me at *****[email protected]  or just reply in zis discussion

    See this
    If you can't update or restore your iOS device

  • HT3986 I've had MS Office:mac 2011 on my imac for around 18 months now.  Outlook has just disappeared and when I find the file and open it it tells me that there is a problem and I may need to re-install it.  I've just done this using the installation dis

    I've had MS Office:mac 2011 on my imac for around 18 months now.  Outlook has just disappeared and when I find the file and open it it tells me that there is a problem and I may need to re-install it.  I've just done this using the installation disc which, then said the installation had been successful.
    Outlook is still not working.  Can anyone please advise me on what to do next.

    Remove MS Office 2011 completely (here are instructions) and reinstall it.
    It's not a simple or fast process but it is important to follow all of the steps in order to get all the files that Office scatters around. This will not affect your data files, only MS Office and its preferences.

  • How Do I use TM to find a file on my computers Idisk from today's backup?

    Where do I find the file that is on my Idisk's Time Machine Backup that was on my laptop this morning when TM backed up????? My Idisk had a problem this morning and when I sought help, they had me hit the stop and restart the syncing. The problem is that even though there was a file on my Idisk on my computer from last night, the Idisk syncing reset every file from the mobileme cloud to my laptop and the file on my mobileme cloud was from 2 days ago. Not the updated one from last night. I teach and my attendance is all taken and stored on the Idisk (and synced) from all my classes. Wed & Thursday attendances were on my laptop correctly. (I know because I checked BEFORE they told me to restart the sync button on preferences. My laptop did its normal BU this morning so I am trying to find the excel attendance file on the backup. Can anyone help????????
    I don't know why that happened but it did!!!
    Thanks for any help you can provide.
    Skip

    Dear Thomas,
    I entered TM and found the sparsebundle under the Filesync library. However, it appears NOT to be recoverable and I tried double clicking on it but it doesnt do anything other than show a summary of what it is.
    By the way, I really do appreciate your comments and agree completely. Something strange happened with my syncing of Idisk (which is set to "automatic"). It has been working fine for years. But for some reason, it stopped two days ago and did not let me know. When I tried to put something manually on it (through drag/drop), it never showed up on the Idisk on the cloud which made me notice and check it out by going to Mobileme through the browser. I then went to the tech service for Idisk and they explained that something probably got corrupted so just hit STOP syncing and then hit Automatic again. Which is what I did. Then everything from the cloud went to my Idisk on my computer and for some reason, the latest version of my excel spread sheet for attendance showed two days ago, not last night. so I lost wed/thursday classes. I KNOW it was on my Laptop which is backed up to TM every morning.. Thats why I believe that the latest file IS on my TM backup for this morning. But I can't get to it. Any other help would be appreciated.
    Skip

  • Can't find imovie file on my hard drive

    I have a imovie file on my hard drive that I can't find. I really want to delete it so
    that I can free up some room on my hard rive. It's at least 15 gigs big. I tried using the search icon in the upper right hand corner and I tried using the 'find' option under the 'finder' menu, searching for any files over 5 gigs in size. Can anyone help me find this file so I can get rid of it?
    [email protected]

    An iMovie project is a package, not a file; the actual files inside it are smaller. Use a tool such as WhatSize to locate it.
    (23171)

  • I have problem with Itunes losing where podcasts and some purchased music is located. Don't know how Itunes losing the locations of the files and I can't find the files on my hard drive. What can I do to stop Itunes losing location and restore my files?

    I have problem with Itunes losing where podcasts and some purchased music is located. Don't know how Itunes losing the locations of the files and I can't find the files on my hard drive. What can I do to stop Itunes losing location and restore my files?

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • I put in my memory card to the left side of the computer, but I cannot find the file of pictures anywhere. Its not even on my desktop. What should I do and how can I get it to show up on my desktop?

    I put in my memory card to the left side of the computer, but I cannot find the file of pictures anywhere. Its not even on my desktop. What should I do and how can I get it to show up on my desktop?

    If your Mac is new-ish and has one of the Lions as its OS, the drives, cards, USB sticks no longer show up, even though they're there. Go to Finder's Preferences and tick the corresponding items in the General and Sidebar tabs.

  • My hard disk suddenly filled up and I can't find the files

    that are causing my hard disk to fill up. I was watching some videos that was on an external drive on my computer using vlc. I finished one movie (.avi file) and then tried to watch the second one in the series. However, the vlc application would not open it. I tried several times. I gave up and tried opening it with the quicktime player. Even though it opened, I got a message that my startup disk was full. That was strange because I am sure I had about 20GB as I was keeping a close eye on my hard disk capacity. I had recently deleted many video files and so I had a rough idea of how much hard disk I should have.
    Anyway, I deleted some movie files to make space and then I checked my hard disk with Disk Inventory X.
    When I did that, I found some strange files.
    There are some temp files some of which are 1GB. The path is private/var/vm/tmp. One file is labeled a Quick Time player launcher document.
    Another one is called "sleepimage". Format is HFS+. It is 4GB. It was modified recently (yesterday). Its path is private/var/vm/sleepimage.
    I don't want to delete anything important by accident.
    I just think this is strange and want to find these files but when I click "Open", it says I don't have permission and I have to locate them in Finder. However, when I type "sleepimage" in Finder, nothing comes up.
    I really want to get rid of any files that take up a lot of space on my computer and that shouldn't be there. Do you think this is some kind of virus? And that's why my computer is filling up with some strange files. There are also many swapfile documents that are 1GB in size.

    I think the problem is Quick Time Player. I am using OS 10.6.8 by the way.
    I tried it out again.
    I had about 26 GB of space before I played an .avi video.
    After the movie started to play (it was slow to load), I got a warning message that my startup disk was full. I opened Disk Utility and it told me I had no space left (about 20 MB or something like that was left).
    I watched to the end of the movie.
    Then I quit Quicktime Player.
    And I shut down the computer.
    I turned on the computer and checked Disk Utility. I have about 26 GB of space.
    I think for some reason Quicktime Player uses up a lot of the disk space when it runs movies that are problematic. This movie I was watching did not open with vlc.
    I normally use vlc to watch movies.
    Probably it doesn't use up this much space when the movie is OK.
    I think there's a problem with this particular movie. It is about 50 MB so it's not that big a file. I watch .smi subtitles with it. The Quicktime Player automatically loads the subtitle file in this case because the subtitle file has the same name as the movie file.
    I watched about 10 movie files from the same series that I downloaded together and did not have any problem watching them. I watched them on vlc. But this latest movie had problems I think (as I repeat). It did not load on vlc even though I waited for a minute, and normally movies load instantly on vlc. 
    So I think that movie file caused problems. It made QT player use up a lot of hard disk space.
    I had better avoid watching that movie in the future. I don't want it to wreck my hard drive.
    So to sum up, everything is back to normal. I have the hard disk space that I should have. However, I am scared of damaging my hard drive due to shonky movie files that eat up all the space when they are played using QT player, and so I will not watch those files in the future, as I do not know why the files do that.

  • I cant access firefox, everytime i try i get that windows can't find the file, i tried redownloading it but it still gave me the same message?

    i cant access firefox, everytime i try i get that windows can't find the file, i tried downloading it again but it still gave me the same message. the problem has nothign to do with my internet because it wonks on internet explorer and everythign is fine, my computer just can't access firefox for some reason. i tried uninstallign ti adn then installing it again, but that didnt work, i tried installing a different version and it still didnt work.
    okay the exact message is" Windows cannot find 'C:\Program Files\Mozilla Forefox 4.0 Beta 1\firefox.exe'. make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search.
    Nothing happens after i install is the "Launch Firefox now" checkbox set, the same message comes up.
    i usually start firefox from the shortcut i have on my desktop but when this happened i thought that the shortcut is the problem, but i went to the Mozilla firefox folder and tried it from there, but it didnt work. i also tried downloading different versions of firefox but that didnt work either.

    can you tell me the solution to "windows cant find firefox" error. thanks.

Maybe you are looking for