Find command with file size

Hello again,
With my find command I'm trying to get my output to include the file size as it would show in Finder. I believe it's called the "physical" size. Am I going in the right direction with this code or is there a better way?
find /Users/username/Library -name "foo" -prune -maxdepth 3 -exec du -hs {} ;
Thanks again for your input,
Rick

If going down the awk route, might try a slightly different approach
find /Users/username/Library
-name "foo"
-prune
-maxdepth 3
-ls | awk '{print $2 "
" $NF;}'
The -ls avoids invoking a subprocess for every file just so the du command can be called.
The down side is that you do not get benefit of the *du -h* option to humanize the values.
Another approach that would invoke du fewer times would be to put xargs in the pipeline
find /Users/username/Library
-name "foo"
-prune
-maxdepth 3
-print0 | xargs -0 du -hs | awk '{print $1 "
" $2;}'
xargs will bundle up a group of files for each du command to process in one invocation.
The -print0 and -0 will make sure that spaces in file paths do not cause problems for the du command.
Oh yea, if you are going to also be performing a bunch of find commands together, you could do all of those commands in a single pipeline
( find /path1 -name ... -print0;
find /path2 -name ... -print0;
find /path3 -name ... -print0
) | xargs -0 du -hs | awk '{print $1 "
" $2;}'
Message was edited by: BobHarris

Similar Messages

  • How can i find out the file size of a Keynote on an iPad please?

    How can i find out the file size of a Keynote on an iPad please?

    I think a rule of thumb is what you're looking for.
    Full bandwidth CD audio (AIFF): about 10 MB/min
    Apple Lossless: about 5 MB/min
    MP3 @ 256k: about 2 MB/min
    MP3 @ 128k: about 1 MB/min
    Of course the MP3 file size is exactly linear with bit rate.
    As for sound quality:
    Apple Lossless is, as the name says, lossless.
    MP3 @128k: fine for listening in the car or the kitchen etc. If you have an audiophile sound system, this will remind you why you spent all that money.
    MP3 @256K: barely distinguishable from CD on very good equipment.
    MP3 @320K: probably not distinguishable from CD.
    I presume that since you're talking about importing classical CDs these are ones you own. Remember you can always do it again if you need higher fidelity or if better technology comes out. I import most CDs at 128k, since most of my MP3 listening is in the car, or walking, or as background. And I can always play the CD if I want to sit and listen.
    The logic for purchased music is totally different -- you probably won't get to upgrade that without buying it some different way. So buying 128k MP3s (or AACs) is something you'll probably regret later. Buying 256k MP3s is a lot less problematic.

  • My mac says that it has 40 gb of movies on it but when i finder search for file size, and for file type it gives me no videos

    My mac says that it has 40 gb of movies on it but when i finder search for file size, and for file type it gives me no videos or movies. I have called apple 3 times and each time they do the same thing and then do something that takes awhile to finish so we hang up and then it never works.
    Please Help

    each time they do the same thing
    And what thing might that be?

  • How do I find out the file size of my photos, and change them to the size

    This will sound inane, but I cannot figure out where to find the file size of my photos in iPhoto. I need a jpeg of a certain file size and image size for my blog background, but can't figure out how to even start.

    If the limited quality options do not get you the file size you need export the full size image files to a folder on your Desktop and use Resize! to batch resize the image dimensions and file size (jpeg compression level) to what you need.
    Click to view full size
    With Resize! you can fine tune the pixel dimensions and file size.
    OT

  • How do I find out app file size

    I only have 1.7gb left on my 8gb phone and notice that an app I am considering is 1.3 gb. How do I find the file size of apps before I buy them so I don't pay for something and then find out that I don't have enough space?
    Thanks!

    I mean if I download this file and am left with only 0.4gb and want to download more apps in the future. Or if I HAD only 0.4gb left and needed to remove apps to make room, how do I know how large the are?
    Thanks!

  • Can I find out the file size of tracks before I import a CD?

    My husband is an audiophile, we listen to classical music. (Although I indulge in some Beatles and other music on occassion.) Is there a way to find out how large the file sizes for each track will be for importing with Apple Lossless versus AAC, as well as different bit rates, before I import the CD onto the computer? I'd like to know how much disk space a classical CD is going to take up before I commit to using up however much of my hard drive it might take. I appreciate thoughts and ideas on the subject.
    Cheers.

    I think a rule of thumb is what you're looking for.
    Full bandwidth CD audio (AIFF): about 10 MB/min
    Apple Lossless: about 5 MB/min
    MP3 @ 256k: about 2 MB/min
    MP3 @ 128k: about 1 MB/min
    Of course the MP3 file size is exactly linear with bit rate.
    As for sound quality:
    Apple Lossless is, as the name says, lossless.
    MP3 @128k: fine for listening in the car or the kitchen etc. If you have an audiophile sound system, this will remind you why you spent all that money.
    MP3 @256K: barely distinguishable from CD on very good equipment.
    MP3 @320K: probably not distinguishable from CD.
    I presume that since you're talking about importing classical CDs these are ones you own. Remember you can always do it again if you need higher fidelity or if better technology comes out. I import most CDs at 128k, since most of my MP3 listening is in the car, or walking, or as background. And I can always play the CD if I want to sit and listen.
    The logic for purchased music is totally different -- you probably won't get to upgrade that without buying it some different way. So buying 128k MP3s (or AACs) is something you'll probably regret later. Buying 256k MP3s is a lot less problematic.

  • How can I find the correct file size of a layered Photoshop document?

    I need to send layered PSD files by email (Mac's Mail), and I don't use services like Dropbox. My ISP allows a maximum file size of 5 MB. I reduce the file size by reducing it to 8 MB/channel, 150 ppi and reducing the maximum size dimension to 10 inches. I'm using CS6 on a Mac.
    If I check the file size using Get Info, I get 9.4 MB.   
    If the file is nested in a folder, the size is likewise, 9.4MB.
    If I attach the file to an email, I notice at the bottom left the file size is given as 12.0 MB.
    If I send the PSD layered file to myself, I find it uploads and dowloads quickly. On the email itself, it says, "1 attachment, 923 MB".
    On my Mac "MAIL" folder, it says the the file is 1.2 MB.
    If I calculate the file size mathematically, I get a size of approximately 4.3 MB. That is not counting the individual layers or the mask stored in Channels, for which I don't know the calculation.
    This is a total of 6 measurements of the file size of my attachment, 5 of which differ.
    Is one of these correct?

    I'd say 9.4 mb is correct. Email attachments always put on a lot of weight, so 12 mb as an attachment is probably right too.
    Why don't you use a free service like Filemail? It's very easy to use, and you dont't have to sign up to use it.

  • Need Help with file size

    How do you reduce pdf size file when it's save? I can have a excel spreadsheet that is 67KB and when I save it as pdf file increases to 289KB?

    I agree that the file size is not a big issue at 289kB. However, a lot of the size depends on the content and the job settings that have been used. It is a good practice in PDFs to embed the fonts and that may be what is causing the size increased in your PDF. You can use PDF Optimize (under the Save As menu in AAX) to access the audit function and find out what is causing the size issue. As mentioned, for the file at hand it is not much of an issue, but may be for future projects.

  • "Convert Selection for iPod" Command Increases File Size?

    Hello!
    I'm trying to convert a file that has the following characteristics (as reported in Quicktime Pro):
    Format: H.264 Decoder, 496 x 208, Millions, AAC, Stereo (L R), 44.100 kHz
    FPS: 25
    Data Size: 572.20 MB
    Data Rate: 659.18 kbits/sec
    Normal Size: 496 x 208
    I know the dimensions are strange, but it's because this is just a test I'm running on a workflow using Hand Brake to bring content back from a DVD (my content).
    Now, when I drop just the original file into iTunes and then try to put it on an iPod, it says it can't be played. So I use the handy new option in the Advanced menu, "Convert Selection for iPod." This yields a new file with the following characteristics:
    Format: AAC, Stereo (L R), 44.100 kHz, H.264 Decoder, 640 x 268, Millions
    FPS: 25
    Data Size: 1.36GB
    Data Rate: 1609.01 kbits/sec
    Normal Size: 640 x 268
    How is it that the data rate and file size have increased so much? It now plays on an iPod, but why? I was under the impression that usually the problem with getting video to play on an iPod was a data rate that is too high. So it seems strange to me that the second file works and the first doesn't.
    Finally, what is the difference between a file with the extension .mov and the extension .m4v? The original file has .mov and the converted ends up with .m4v. But they have the same characteristics in terms of codec. So what's the difference?
    Thanks for any help and info!
    Cameron

    I think I was able to resolve this myself after some trial and error. It looks like it is all in the name of the file. I've gotten some files to transfer after going into the Get Info section and updating the name (usually shorten the name or take out non-letter/number/# characters and then get the filename on disk to match.

  • Problems with file size

    There are a few discussions on this subject but I've been unable to resolve my problem.
    I created a 24 page catalogue in InDesign, file size c30Mb. When I export to Acrobat the resulting file is about 11.5Mb. I need to get this down to 5Mb for online publishing.
    As a last resort, I stripped out all the hi-res EPS image files and replaced them with smaller jpegs.....all to no avail. In fact the source InDesign file has not changed at all. To that end:
    1. Is there a way to identify the file size of the various elements of the InDesign file to see where the big bits are?
    2. What else can I do to get the pdf file below 5Mb?
    Thanks for any advice.
    totallockout (Novice CS user)

    One very important thing to understand is that you can't simply legislate the resultant PDF file size when creating PDF from original content.
    Image size and resolution certainly can have a major effect on the resultant PDF file size, but there are other possiblities including large amounts of vector artwork for which the only way to bring down the file size is to turn it into raster image (often making it unreadable) or by simplying it.
    When you refer to your EPS images (we strongly recommend against using EPS for images in the 21st century), we assume you mean raster images that were saved as EPS in Photoshop. It is possible that those high resolution images were already compressed quite a bit and thus, smaller JPEG versions of the EPS files would not have any appreciable effect on the output PDF file size.
    Quite frankly, if much of your 24 page catalog is imagery, 11.5MB of PDF is not bad at all. Maybe if you can post a copy of the file, we can give you some further advise. But in the end, you might have to dramatically simplify your design to reach a target output file size.
              - Dov

  • Windows Update Helps with File Size Issues?

    I'm just wondering if anybody has recently noticed an
    improvement related to the file size issue variously reported
    throughout the forums?
    I ask because our IT folks distributed a Windows update on 2
    days last week and since the application of those updates I have
    not experienced the freakishly large file sizes and the related
    performance issues in Captivate. Unfortunately I don't have any of
    the details of what patch(es) were installed, as it was part of our
    boot script one morning and I didn't even realize it was updating
    until I received the Reboot Now or Later alert.
    Anyway, I was curious because I have experienced significant
    performance improvement since then.
    Rory

    If you are using a remote workflow ... designers are sending off-site editors InCopy Assignment packages (ICAPs) .... then they need to create assignments in order to package them for the remote InCopy user. So there's no need to split up a layout into smaller files or anything.  An assignment is a subset of the INDD file; multiple assignments -- each encompassing different pages or sections -- are created from the same INDD file.
    When the designer creates the assignment, have them turn off "Include original images in packages"; that should keep the file size down.
    Or -- like Bob said -- you can avoid the whole remote workflow/assignment package rigamarole all together by just keeping the file in a project folder in the Dropbox folder on teh designer's local hard drive, and have them share the project folder with the editors. In that workflow, editors open the INDD file on their local computer and check out stories, just as though they were opening them from a networked file server.
    I cover how the InCopy Dropbox workflow works in a tutorial video (within the Remote Workflows chapter) on Lynda.com here:
    http://www.lynda.com/tutorial/62220
    AM

  • How to find the XML file size in the scenarios?

    Hi All,
    Recently i have attended an interview at a MNC.
    They asked some realtime questions like
    1.how to find the XML document size in a File-File scenario?
    2.What is mass-assignment replication etc.....
    Can anybody tell me the solution for these.
    Best regards
    Hari prasad

    If the input is a flat file, there is no exact way to calculate the size of the generated XML file, since it depends on many factors (number of fields in the recordsets, size of the name of the fields, number of records, etc).
    As a rule of thumb, generally ppl use XML file size = 2 x Flat file size, in order to do sizing calculations etc. But again, that is just an estimation, not a precise calculation.
    Regards,
    Henrique.

  • Noob Needs Help with File Size

    I created a simple form with no graphics, fonts are not embedded, and I selected the file to be filled out, printed, then mailed. The file size is 21MB. The form is to be emailed so it must be much smaller in size. Once received, the user will fill it out electronicly, print the form, then mail it back to me regular postal mail. Why is the file size so large and how can I make it smaller? Thanks in advance.
    Kevin

    OK. Here's what I did:
    1. At the welcome screen I selected "New Form" and then "New Blank Form"
    2. For the page size I left it at "Default" which is 8.5 x 11.
    3. For Return Method I selected "Fill then Print".
    4. At the last screen I just clicked "OK".
    5. Then I built the form. I put in (9) Text boxes, (4) Text Fields that look like Sunken Boxes, (5) Numeric Fields that look like Sunken Boxes, and (3) Check Boxes that look like Sunken Boxes.
    6. I then saved the file as a Static PDF Form File.
    7. The file size is 22.5 MB.
    That was my second attempt. The first attempt I had the fonts embedded and I had a Logo on the form. The file size for that one was 27.3 MB.
    Thanks for the help.
    Kevin

  • Content Server Report- Document types with file sizes & Status history

    Hi
    We are about to start with implementing Seal Systems, however we are a global company with to start with 4 content servers in different regions of the world. In order to determine bandwidth for future strategies, I need to know what is stored on each content server in terms of document types, type file and size of files attached to each document type and of course date created and status changes  of each document.
    In addition we are of course contemplating usage of SAP Cache servers, not only for better responses, but also for backup purposes.
    What we are using is SAP ECC 6 with the content servers using MAX DB. I have contemplated creating a Z program in order to return only the required information for import in Excel where I can then manipulate the returned result to a report which fits us.
    But before I start with this, does anyone know of any report or tools just to do that within SAP? I have seen these capabilities in other PLM solutions.
    I would appreciate any feedback in this regard
    with friendly regards
    Joe Kosterman

    Hi Joe,
    maybe transaction DB20 could help you here.
    From DMS side tables DMS_PHIO2FILE and DMS_PH_CD1 are most relevant for original data stored in Content Server.
    Regarding the changes of documents report MCDOKABL will show you all the changes done for a specific document.
    For maintaining and monitoring content repositories please see transaction CSADMIN.
    Best regards,
    Christoph

  • Something fishy with file sizes and drives

    Hello all,
    I wonder if someone might offer up a suggestion on why I cannot seem to copy a file.
    Here's the background:
    Hardware:
    -MacBook Pro 15" (Jan '06)
    -External Western Digital 250GB Passport drive powered from the USB connection, connected directly to the computer USB port.
    -External 750GB drive in an enclosure with its own power supply, connected through a USB hub, also with its own power supply, plugged into the other computer USB port.
    Situation:
    I wanted back up my Aperture library, which currently sits on the WD drive. It's a single package file, and OSX reads it as being approx 25.5GB in size. I thought I could simply copy it over to the generic drive. This generic drive currently acts as both a backup using Time machine (currently turned off), and a backup for other misc stuff not under time machine's control. OSX shows that there is 66GB free on the generic drive.
    Yet, when I try to copy the Aperture library file, OSX tells me there isn't enough space on the generic drive, in spite of there apparently being over twice as much space as needed.
    I've run a Disk Utility verify check on both drives and both appear to be fine.
    Does anyone have any idea why this copy won't complete?
    My thanks in advance,
    m.

    That's a good suggestion. I cannot remember how I formatted it. I will check once I'm behind the mac again. I can tell you it isn't partitioned, and it should be formatted to mac formatting, but it's definitely something I hadn't thought of before. Thank you!

Maybe you are looking for

  • Can you please take a look at my TM Buddy log and opine on what the problem is?

    Pondini, Can you please take a look at my TM Buddy log and opine on what the problem is?  I'm stuck in the "Preparing Backup" phase for what must be hours now.  My last successful backup was this morning at 7:16 am.  I did do a series of Software Upd

  • NM 5.5 Win 7 Ultimate RC Build 7100 x64 support

    I heard that the Wireless Connection Manager would NOT be part of the 64-bit versions of NM 5.5.  I have been running the 32-bit NM 5.1, and now 5.5 without issue on my desktop and love it.  I backed up everything before installing the RC but no way

  • Rules and functions (PE04)?

    hi while passing the parameters(embedded in the schema) on calling any function..can u see where those parameters are stored at the run time?table or syst variable.. like whenver operations are called in payroll the OP is getting populated ... like t

  • Accidentally deleted photo booth (and other preinstalled apps) on ipad

    I think my little one deleted FaceTime, Photo Booth, Camera, and a couple other apps on our new iPad. How can I get them back?

  • Error while calling an external javascript file

    Hi, I have added a javascript file into the public_html folder, i have named it main.js. I have a html file in which i am referring to the javascript externally , this too is in my public_html folder. But the HTML page does not seem to be able to inv