Monday, September 28, 2009

iWork'09 Update 3

New update is available today: iWork'09 update. Since I purchased iWork 09 recently, I got this update. Actually, I have only one problem with Keynote when it tried to load a black template while I tried to follow Apple's video tutorial. The background was in mass colour instead of black. I tried other templates and I had same issue with background colour. Finally, I resolved the issue after I rebooted my Mac. Not sure if this has anything with the fixes in this update.



Here is the space comparison:
Commad: df -lkUsed(Kilobytes in 1024-blocks)
Before ...4,081,508
After...3,102,988
Difference (A-B)-978,520


It is a surprise that I got more space back after the update. Not sure what caused the gain? I did clean my trash before the update. After the update date, my trash was empty. I went to Finder to duplicate a file and then delete the file. As a result, I could clean my trash again. I did realize that 5 items were securely removed (even one pdf file I deleted). I don't understand that what were other 4 items come from? Maybe I should post this question to SupperUser.com.

Tuesday, September 22, 2009

iTunes 9.0.1 Update

Today I got news from AppleInsider about new updates about iTunes 9.0.1. I installed the new update immediately. No reboot is required for this update but root password is required.


Here is the space comparison:
Used(MB in decimal base)
Before 197,895
After197,954
Difference (A-B)-59

Saturday, September 19, 2009

Schedule a Job by using Terminal Command at

I read a blog on 100 Mac tips and tricks. One of them is the command "say". Basically, you can type in any text or cat a file and pipe output to say. Then you will hear your Mac speech reading the text out. I played this one with several text and text files. It was very interesting. Then I had a thought: can I schedule the speech command to some time later? I remember that in UNIX you can run a command or job by using at command. I immediately tried to use at to schedule a speech. But I failed to do it.

Quickly I found that Mac by default disabled the at command. What I needed to do first was to make at enabled. From Stackoverflow, I was redirect to Supperuser.com, from developer's web page to computer user web page. There I got the following answer, using command lauchctl to enable at:

$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.atrun.plist

where sudo is to run a command as supper user; launchctl as an interface to run launch to load daeamons; and -w is used to override the Disabled key (in plist) and set is to false.

Just for sure, I rebooted my Mac to give my first try by the following command:

$ at now + 1 minute
say 'Hello, World! This is a scheduled announcement by at command.'
<EOD>

where <EOD> is Control+d key for marking end of doc. After one minute, I heard the announcement from my Mac. Then I tried another command:

$ at now + 1 minute
rm test.txt
<EOD>

This is a command to remove test.txt file in the current path. As scheduled, I confirmed the remove: test.txt file in the current path was gone.

According to the manual of the command at, it is used to run a specific job in a separate process group with no controlling terminal. More information about this command can be found by using man:

man at

For example, -l option is used to list the current scheduled jobs. "atrm job_number" command is for removing a job.

Monday, September 14, 2009

Tip: Link to New Tab for Safari

It is very annoying when you open a link in Safari with "target='_blank'" attribute. The default action will open the link to a new window. Most browsers do have option settings to change this behaviour to a new Tab such as FireFox and IE. However, I could not find this kind setting in Safari's Preference.

One way to change the link to a new tab is to hold Command key and then click on the link. This works well, including the case that a link may not have "_blnak" attribute. Basically you can direct the link to a new tab with Command+click. This feature also works in FireFox (in Windows, you use Control key). However, I sometimes just forget to hold the Command key. Any way to change this settings?

Yes. I just found out that you can the Safari's default setting by using Terminal from Spotlight(Open Terminal from Command+Space). Then type the following command:

[Home] $ defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

in this command, "defaults" is the command key word. You can find the description from man:

[Home $ man defaults

"com.apple.Safari" is a domain name in the format of com.company.application. Here the company is apple and application is Safari. Next one "TargetedClicksCreateTabs" is a key in the default settings for Safari. "-boo" is used to specify a type and "true" is the value to be set.

Before I tried to set this value to Safari's default setting, I worried about it may mass up my settings. So I tried to use read to check if this setting is already set or not, and what is the value if it is set:

[Home] $ defaults read com.apple.Safari TargetedClicksCreateTabs

The result is nothing. Then I think that if I set it, this will be a new setting in my Safari's defaults. It should be OK. I set it and checked it again by read option.

Since the word "TargetedClicksCreateTabs" is too long, I had several times typed it wrong. Then I tried to use grep to get the result (grep is a tool in UNIX to find a string):

[Home] $ defaults read com.apple.Safari | grep "Target"
TargetedClicksCreateTabs = 1;

The first part before | reads all the default settings for Safari. "|" pipes the result to the tool of "grep", which searches or filters for only lines with "Target" string.

Sunday, September 13, 2009

Spotlight Calculation and Copy/Paste

Spotlight is the most handy tool I use. Just press Command+Space, and then text area is displayed in the up right corner. From there , I type in a key word, or just a partial word, for my application or document. Press enter key to accept the selection. Within seconds, the application or document I want is opened.

The Spotlight has its dynamical index being updated to learn my most used words. For example, if I use Yahoo web site most of time in Spotlight, I just need to type Y or Ya then Yahoo web site is the top one selected ready for use.

I learned that people also use the Spotlight to do calculation with functions as well. I like this very much and use it most of time. No need to launch Calculation, Numbers or NeoOffice Spreadsheet if I just need to do a simple calculation. For example, I use it most of time for the calculation of the space saved between before and after an installation.



The tip of today is not just the calculation in Spotlight. I find out that you can also use Copy and Past features to get and to use the result. For example, after the calculation (make sure there is no selection in the calculation expression), just press the Command+C. The result will be in clipboard, 268 in this example. Then I can past the result to my blog just by pressing Command+V keys.

Today's tip is that you can do your calculation and get the result at almost the same time!

Updates: OS 10.6.1 and NeoOffice

I installed the Snow Leopard's first patch 10.6.1 two days ago. The following is the snap-shot of the installation details.

Mac OS 10.6.1 Update



Here is the space comparison:
Used(MB in binary base)
Before 281,042
After283,220
Difference (A-B)2,178

NeoOffice 3.0 Patch 7 Update

My NeoOffice has been not able to launch since I updated my OS to Snow Leopard. This is the comparability issue. Fortunately, NeoOffice quickly released a update to resolve the issue. The following is the space difference between before and after the installation:
Used(KB in decimal base)
Before 199,373,104
After199,376,400
Difference (A-B)3,296

After the installation, my NeoOffice is back to live.

Saturday, September 12, 2009

Revised HD Saving: Snow Leopard OS

Recently I started to tack space changes before and after a new software or a update being installed. I noticed that the values I get from Get Info (from HD's context menu) is different from the values I get from the command of "df -lhg" in Terminal. I posted a question about this to Apple's discussion forum.

Quickly I got the explanation: the flag "h" is for GB in binary base, i.e., 1,073,741,824. I should use the flag of "H" for decimal base: 1,000,000,000 since the values in Get Info are in decimal base. The correct command in Terminal to get the similar decimal values should be:

   $: df -lHg

The ratio of the different bases is 1.073741824. In the words, for each decimal value of 1 GB, the binary value has about 0.073741824 factor less since the binary base is slightly larger than the decimal base. When you have HD space about 400-600 GB (decimal base), the decimal value has about 29-44 GB more than binary based values. They are in different bases. The real values are the same. However, the values in binary base is more actuate in terms of computer world because the information are written to disk in binary.

By the way, the values in Get Info is up to two decimal precision, while the results of the command of df are all integers.

It is quite interesting I found that the Get Info of the pre-Snow Leopard OS(or Leopard as far I know) uses binary based values, while the Snow Leopard OS starts to use decimal values. I was not aware about this. The numbers of my notes about before and after Snow Leopard installation are from Get Info. They are ACTUALLY based in different bases. So my blog of the space difference calculation was wrong. The following is the correct calculation:

Capacity(GB)Available(GB)Used(GB/Bytes)
Before(binary base) 465.44 266.85 198.59(211,092,037,632)
After (decimal base) 499.76 299.3 200.47(200,067,039,464)
After' (binary base) 465.44 278.74 186.7(186,326,950,289)
Difference (A'-B)011.89-11.89(-11,024,998,168)

Here the binary base is the base of one byte. In this base,

1 Kilobyte is 1,024-byte (1-Kbyte) or 2**10 ,
1 Megabyte is 1,048,576-byte (1-Mbyte) or 2**20, and
1 Gigabyte is 1,073,741,824-byte (1-Gbyte) or 2*30.

While on the decimal base,

1KB is 1,000 bytes,
1MB is 1,000,000 bytes, and
1GB is 1,000,000,000.

Therefore, the decimal base values cannot be exactly represented by 2 power base.

Wednesday, September 9, 2009

iTunes 9.0.0 Update and SilverLight 3.0 Update

Today is Apple's "It's Only Rock and Roll" event. iTunes 9.0.0 is released and iPhone 3.1 is also released. All are free!



Here is the comparison of space used before and after the update:

Used (512-blocks)Available
Before402,414,624573,174,720
After403,008,112572,581,232
Diff (A-B)593,488-593,488


I used the following command in Terminal to get the result:

[home] $ df -lh

where df is a command to disk free space, options: l for local-mounted filesystems, and h for "Humber-readable" output. Next time I'll use -k to get block size 1 Kilobytes instead of 512 bytes block.

Silverlight 3.0 Update

Yesterday when I browsing Microsoft Channel 9 feed, I was prompt to update Silverlight to 3.o. I did the update. The following the space comparison before and after:

Used (512-blocks)Available
Before401,201,336574,388,008
After401,242,016574,347,328
Diff (A-B)40,680-40,680

Sunday, September 6, 2009

Mac OS X 10.6 Snow Leopard

Yesterday I purchased Mac Box Set, which contains three updates or new packages: Mac OS Snow Leopard, iLife 09 and iWork 09. For sure I need the first two but I was hesitated about iWork. I thought that NeoOffice should be good enough. However, one of my friends has iWork and he likes it very much and told me that iWork is totally different thing comparing to Microsoft Office. I decided to give it a try with this whole set.

SNOW LEOPARD

First, it was very smooth to install the Snow Leopard. It took less than one hour to install it to my iMac 24, which I got about one and half year ago. Before I installed it, I cleaned up my hard disk and emptied my trash, and cleaned all the caches by using OnyX. Then I shut down my iMac and restarted my iMac. When I insert my OS CD during the log in screen, there was nothing happening. I had to log in and then I saw the OS CD. I clicked on this CD and the Install OS icon is there. I clicked it to start the installation.

The installation screen is very clean: big X and a progress bar with a message of estimated time remaining. There is no any commercial messages or graphics about OS X. The status bar displayed a message to tell me how much time left. At the beginning it was 45 minutes and soon the time increased to about 1 hour. I let it run and went to my kitchen to help to clean dishes. I came back frequently to check its status. At about the time 10 minutes to its end, I came back. Like any OS application, the installer displays a group of menus on the top. When the installation finished, it displayed a message saying that it would restart in 30 seconds. If you click on any menu, the count down stops. There is one menu item for displaying Installation Log (this one also available for iLife and iWork installations), I opened it. The log have three options, Errors, Errors and Progress and All. If the log is opened, the countdown is also stopped.

From the log, the start time was at Sept 5 19:48:02 and end time as Sept 5, 20:15:52. However, I think I started the installation at about 19:30:00. About 45 minutes time, it is still very fast! I made a note about my HD status and here is the comparison:

Capacity(GB)Available(GB)Used(GB/Bytes)
Before 465.44 266.85 198.59(211,092,037,632)
After 499.76 299.3 200.47(200,067,039,464)
Difference (A-B)34.3232.45 1.88(-11,024,998,168)

NOTE: see my correction in another blog.
There is no requirement for serials number or key for the installation.

After I installed the Snow Leopard, I shutdown my Mac and restarted it again. The first time it took a while to start, about 2-3 minutes. Then I checked my Safari and FireFox. They work fine without any issues. Th OS itself looks as same as before. I shutdown my Mac again. This morning I started it again. It took about 45 seconds to start from the power on to the login screen. and just 5 seconds from my login to my Mac. It is really fast!

iLife 09

After I installed the Snow Leopard, I checked several programs to make sure everything is fine. Then I started to install iLife 09. The installation does not require to enter a key or serials number. The installation says that it requires about 5.37 GB HD space. Actually those are the numbers I noted:

Capacity(GB)Available(GB)Used(GB/Bytes)
Before499.76298.96200.81 (200,806,490,112)
After 499.76297.56 202.21 (202,207,981,568)
Difference (A-B)0-1.41.4(1,401,491,456)


iWork 09

Finally it is the time for iWork. It requires less space as indicated in the installation (898 MB). Here are the numbers:

Capacity(GB)Available(GB)Used(GB/Bytes)
Before499.76296.52203.24 (203,241,398,272)
After 499.76296.01203.75(203,749,146,624)
Difference (A-B)0-.51.51(507,748,352)

After the installation, I was eager to see how it works. I tried to type Numbers from SpotLight(Cmd+space). I got iNumber 08 and prompt me for a serial number key (I did not get iWork 08 and the try-version was expired). Then I realized that the installation does not overwrite my iWork 08. I find out that iWork 09 is in my Applications.

Then I trashed my iWork 08. The first time I run the iWork 09 again, I was prompt to register it with my name and email. I clicked on the Register button. That's all I need to do. I watched a tutorial video Introduction in the welcome(it only displays first time). It is very different from Excel. All the worksheets are tables in Numbers, and they, including graphics or chats, are placed in a canvas. It is very smart and impressive! This is just my first quick look and I did quickly try Pages and KeyNotes as well. I think I am going to use iWork for my works and I'll share my Mac experience during my exploration.