Split & Cat Large Files

We still live in a 32-bit world.  This mean if you deal with large file transfers, you will undoubtedly bump up against the 4 GB limitation (2^32) posed by legacy file systems and network infrastructure.  One way of skirting around the 4 GB limitation is to use the Unix commands split and cat to split up large files into smaller chunks.

For example, if you’re trying to save a 5 GB file (e.g. 5gb_largefile.iso) to a USB drive formatted for the FAT32 filesystem (max file size of 4 GB), you can split and save the file as 3 files of 2 GB or less with the following command:

split -b 2048m 5gb_largefile.iso 5gb_largefile.iso_

to yield the following files:

  • 5gb_largefile.iso_xaa (2 GB)
  • 5gb_largefile.iso_xab (2 GB)
  • 5gb_largefile.iso_xac (1 GB)

When you’re ready to utilize the file, you can combine the 3 files back into the original file with the following command:

cat 5gb_largefile.iso_xa* > /tmp/5gb_largefile.iso

In this case, you need to be sure to write the output to a directory (e.g. /tmp on a Unix machine) that does not have the 4 GB limit.

cURL Shell Scripting

A shell script that processes a batch of file URLs and determine the availability of each file:

#!/bin/sh 
# expects "|" delimited file containing 2 columns
# column 1: line number
# column 2: URL
#
# outputs "|" delimited file containing 3 columns
# column 1: line number
# column 2: file URL
# column 3: file available (Yes|No) 
printf "Enter the file name containing the file URLs (input)\n"
printf ":"
read URL_LIST

# make sure input file exist
if [ ! -f $URL_LIST ]; then
 echo "Invalid input file specified."
 exit 1
fi

printf "Enter the file name to capture results (output)\n"
printf ":"
read URL_STATUS

# make sure output file doesn't exist
if [ -f $URL_STATUS ]; then
 echo "Invalid output file specified."
 exit 1
fi

printf "line number|file url|file available\n" >> $URL_STATUS

# loop through input file, row by row
for i in `cat $URL_LIST`; do

# parse for 1st & 2nd column, delimited by "|"
line_no=`echo "$i" | awk -F'|' '{print $1}'`
url=`echo "$i" | awk -F'|' '{print $2}'`

# echo progress to screen
printf "Processing line "
printf $line_no
printf "\n"

# check HTTP header if remote file exists; returns "HTTP/1.1 200 OK"
output=`curl --max-time 6 --silent --head $url | grep 'HTTP/1.1 200 OK' | wc -l`

# output line number & URL to file
printf $line_no >> $URL_STATUS
printf "|" >> $URL_STATUS

printf $url >> $URL_STATUS
printf "|" >> $URL_STATUS

# output line number & URL status to file
if [[ $output -eq 1 ]]; then
 printf "Yes\n" >> $URL_STATUS
else
 printf "No\n" >> $URL_STATUS
fi

done

Certified Scrum Master

I have successfully completed the Scrum Master Accredited Certification Program from the International SCRUM Institute:

Matching Pair 1.1

Matching Pair is an iOS game for all ages.  The objective is to find all matching pairs from a set of playing cards that has been randomly shuffled.  A matching pair consist of two cards that have the same color and rank.  For example, the King of Heart and the King of Diamond are a matching pair, since they are both red cards and they are both Kings.

Version 1.1 will soon be available for download on Apple’s iTunes App Store.  Download version 1.0 now to get version 1.1 as a free upgrade.

Matching Pair 1.1 includes critical bug fixes, usability enhancements and social network integration. Specifically this release:

  • Fixed bugs that periodically caused the application to crash when the user is logged in to Game Center.
  • Integrated with Facebook to allow the user to share game results with friends on Facebook.
  • Added Settings screen to allow the user to change game settings, reset Game Center Achievements and login/logout from Facebook.
  • Improved playability by automatically closing one of the face-up cards (new setting), when the user selects another card with 2 cards already opened.
  • Introduced different levels of gameplay by adding a new ‘Match Color Pair’ setting that allows the user to specify whether a matching pair must have the same color.
  • Added 2 additional Leaderboard categories for games played with the ‘Match Color Pair’ setting turned OFF.

For more information, check out the Matching Pair Product Page.

This slideshow requires JavaScript.

Sean’s 10th Birthday

We celebrated Sean’s 10th Birthday at Petroglyph, a local paint-your-own pottery studio.  It was a fun afternoon for everyone, especially for Sean.  It was his first time painting ceramics.  He decided to paint an ice cream cone, his favorite dessert.  And as a gift, the staff at Petroglyph painted him a custom Angry Bird dinner plate.  Needless to say, he was thrilled when he saw the final products.  Judging by his smiles, it was a memorable and happy birthday!

This slideshow requires JavaScript.

Download Pro Calculator 1.2

The Download Pro Calculator is an iPhone application designed for software professionals and power users looking to estimate the transfer time and the storage media required for large file downloads or transfers.

Version 1.2 is now available for download on Apple’s iTunes App Store.

This release includes the following enhancements and bug fixes:
  • Fixed the vertical scrolling bug for the Connection Speed and Storage Media list.
  • Fixed screen layout bug (on iPad running  iOS 5) when the iAd banner is hidden.
  • Extended maximum value to 1024 for new Connection Speed and Storage Media.
  • Updated the default Connection Speed and Storage Media list for new installations.
  • Added cross promotion screen on startup to promote other applications.
  • Conducted full regression testing on iOS 5 devices.

For more information, check out the Download Pro Calculator product page.

Protected: Happy New Year

This content is password protected. To view it please enter your password below: