[X-Unix] Expanding a Mounted Sparse Image while Copying

Kirk McElhearn kirklists at wanadoo.fr
Fri Dec 22 00:43:30 PST 2006


On Dec 22, 2006, at 5:51 AM, Rick Gordon wrote:

> How do you copy to a sparse image so that the image will be  
> expanded as required?
>
> I tried creating a small sparse image using Disk Utility, mounting  
> it, and then running a shell script that successively makes  
> directories on the mounted image, and then copying data to it.
>
> #! /bin/sh
> cd /Applications
> mkdir /Volumes/PSCS3_Installation/Applications
> sudo cp -R -pv <file_1> ... <file_n> /Volumes/PSCS3_Installation/ 
> Applications/
> cd /Applications/Utilities
> mkdir /Volumes/PSCS3_Installation/Applications/Utilities
> sudo cp -R -pv <file_1> ... <file_n> /Volumes/PSCS3_Installation/ 
> Applications/Utilities/
> ... etc. ...
>
> But I soon get a "No space left on device" error. What should I be  
> doing to avoid this?

I've never tried copying to a sparseimage from Terminal, but from the  
Finder it expands as needed. Perhaps it won't expand from Terminal...


Kirk
               Co-author of: Mastering Mac OS X - Tiger Edition
                    http://www.mcelhearn.com/tiger.html
                -        -        -        -        -        -
              Read my blog: Kirkville -- http://www.mcelhearn.com
           Musings, Opinion and Miscellanea, on Macs, iPods and more




More information about the X-Unix mailing list