Sponsored Content
Full Discussion: os x hdiutil expert needed
Top Forums UNIX for Advanced & Expert Users os x hdiutil expert needed Post 302626053 by nextyoyoma on Wednesday 18th of April 2012 07:38:19 PM
Old 04-18-2012
For an image whose compressed size is 3.05 gb

Code:
/array>
	<key>Size Information</key>
	<dict>
		<key>CUDIFEncoding-bytes-in-use</key>
		<integer>3045130752</integer>
		<key>CUDIFEncoding-bytes-total</key>
		<integer>3045130752</integer>
		<key>CUDIFEncoding-bytes-wasted</key>
		<integer>0</integer>
		<key>Compressed Bytes</key>
		<integer>3045130752</integer>
		<key>Compressed Ratio</key>
		<real>1</real>
		<key>Sector Count</key>
		<integer>6136138</integer>
		<key>Total Bytes</key>
		<integer>3141702656</integer>
		<key>Total Empty Bytes</key>
		<integer>96571904</integer>
		<key>Total Non-Empty Bytes</key>
		<integer>3045130752</integer>

The important field here is "Total Bytes." There are no mathematical calculations, it is parsed directly from the hdiutil -plist. Pretty much every image I have is larger than 2 gb. These are service diagnostics, and each one is basically a fully-functioning bootable OS. I need to get multiple drives set up with 30+ of these images, which is why I wrote the script. Everything works perfectly except this one operation. Hopefully I (or we!) can find a solution!

---------- Post updated at 06:38 PM ---------- Previous update was at 06:24 PM ----------

I'm thinking that we aren't going to find a way to fix this issue directly. Unless anyone has any other suggestions, I think I might have to look at finding a way to round the size up to the nearest GB size and use that instead. I don't think I can do that in bash though, but I'm pretty sure I can figure out how to do it an awk. I know this isn't the scripting forum, but if one of you has any insight on how to do that I'd appreciate it.

Of course, I'm still open to any other solutions anyone comes up with.
 

6 More Discussions You Might Find Interesting

1. Solaris

expert vi commands

:) Hi UNIX friends, Where do I get advanced vi commands to practice. Please Help Me. Love (4 Replies)
Discussion started by: Love
4 Replies

2. UNIX for Advanced & Expert Users

Expert Opinion

This perhaps does not belong in ths category; apologies, however, we have a heated debate going and your input will decide the result. Should UNIX (HP, AIX, etc) be rebooted following a monthly cycle (Every month, or a qtr, etc.). We have some UX admins (grumps) who say they have seen a UX... (6 Replies)
Discussion started by: rsheikh
6 Replies

3. Shell Programming and Scripting

Expert cp command

How can I use the cp command to copy every file that I can find inside several folders cp -R *test* folder Supose there is ./122342343teste122343.txt ./bound/123teste1223453.txt ./feed/123teste1223453.txt and i want the files 122342343teste122343.txt, bound/123teste1223453.txt... (12 Replies)
Discussion started by: lipe.82
12 Replies

4. Solaris

Becoming a Solaris expert?

Hello everyone, how do you really study to become an expert in solaris OS? Thanks (3 Replies)
Discussion started by: cjashu
3 Replies

5. Shell Programming and Scripting

Parse hdiutil -plist data for specific info

I am trying to get the mounted size of a compressed .dmg. I can use hdiutil imageinfo -plist $imagename to get a lot of info, including what I need. The problem is that I have no idea how to parse that single piece of info into a variable (or in this case, array element). Here is what I have so... (2 Replies)
Discussion started by: nextyoyoma
2 Replies

6. Shell Programming and Scripting

Optimizing the Shell Script [Expert Advise Needed]

I have prepared a shell script to find the duplicates based on the part of filename and retain latest. #!/bin/bash if ; then mkdir -p dup fi NOW=$(date +"%F-%H:%M:%S") LOGFILE="purge_duplicate_log-$NOW.log" LOGTIME=`date "+%Y-%m-%d %H:%M:%S"` echo... (6 Replies)
Discussion started by: gold2k8
6 Replies
vdltodmx(1)                                                   General Commands Manual                                                  vdltodmx(1)

NAME
vdltodmx - dmx configuration file parser and printer SYNOPSIS
vdltodmx infile outfile DESCRIPTION
vdltodmx reads the input file, which should be in VDL configuration file format. After a successful parse, a file in Xdmx configuration file format is written to the output file. The VDL file format is used with xmovie, which is available from http://www.llnl.gov/icc/lc/img/xmovie/xmovie.html EXAMPLE
Given the following VDL-format file: 0 2 # # 2560 2048 Left two-thirds [restrict=*:2] 2 :2.1 1280 2048 0 0 0 0 :2.2 1280 2048 1280 0 0 0 4 1280 1024 0 0 1280 1024 0 1024 1280 1024 1280 0 1280 1024 1280 1024 # 2560 2048 Right two-thirds [restrict=*:2] 2 :2.2 1280 2048 0 0 0 0 :2.3 1280 2048 1280 0 0 0 4 1280 1024 1280 0 1280 1024 1280 1024 1280 1024 2560 0 1280 1024 2560 1024 the following DMX-format file will be produced: # # virtual "Left two-thirds" 2560x2048 { display :2.1 1280x2048; display :2.2 1280x2048 @1280x0; } # virtual "Right two-thirds" 2560x2048 { display :2.2 1280x2048; display :2.3 1280x2048 @1280x0; } BUGS
If the VDL file is not in the expected format, the program will probably dump core. SEE ALSO
Xdmx(1), xdmxconfig(1), vdl(3), xmovie(1) X Version 11 xorg-server 1.12.4 vdltodmx(1)
All times are GMT -4. The time now is 07:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy