Shrink the sparse disk image of a Mac OS X guest OS in VMWare Workstation

Before start the process please make sure,

  1. The file is a sparse disk image, and not pre-allocated.
  2. The VM does not have snapshots.

Erase free space on the guest OS’s disk from within the guest OS using Disk Utility, then shrink the guest OS’s disk from the host OS using vmware-vdiskmanager at the command line.

In the guest OS:

  1. Open Disk Utility.
  2. Select the guest OS’s partition.
  3. Go to the “Erase” tab.
  4. Click on the “Erase Free Space” button.
  5. Make sure “Zero Out Deleted Files” is selected, and erase the free space.
  6. Once it’s finished, close Disk Utility, and shut down the guest OS.
Or in the terminal of the guest OS when the partition is named ‘Macintosh HD’:
diskutil secureErase freespace 0 Macintosh HD

In the host OS:

  1. Open Terminal as an Administrator and type:

path-of-vmware-foldervmware-diskmanager -k path-of-virtual-machineguest-name.vmdk

Press Enter

Note: It will take a while to shrink the Virtual Disk.

Apple Time Machine and FTP

There is a way to use FTP drive with Time Machine. Here are the steps:

1. Install MacFUSE (Download) and configure it.
2. Install MacFusion (Download) and configure it with your FTP server.
3. Run MacFusion and mount your FTP server.
4. Open terminal and run this command:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

You should now be able to open time machine and select your FTP server.

Note : It will not give you faster performance as like direct storage with your Mac.

Eject a stuck CD/DVD from your MacBook

Having a disk jammed in your Mac is really frustrating. If you have already tried holding down the Eject key on your keyboard to no avail, try these tips to ditch that pesky DVD from the drive:

* Launch the Terminal and type the following at the command line:  

 drutil eject

* Reboot the MacBook / MacBook Pro and hold down the mouse/trackpad button as the Mac boots, the disk should pop out.

Did the above two tips not work to eject the disk? If a DVD is completely stuck in the MacBook / MacBook Pro drive and it’s still spinning, you can also try this trick: get a small piece of thin cardboard (business card or a credit card works fine too) and insert it above the stuck DVD and press down slightly to stop the disk from spinning, now reboot the MacBook while holding down the trackpad button and you should hear the familiar eject sound, then disk should come right out

Use Spotlight as a Calculator and Dictionary

Spotlight, It’s a great innovation of Apple. We are getting a lot of benefits from it.
To use Spotlight as a calculator all you have to do is type in an equation. You can do simple math, or complex equations using mathematical terms like square roots and so forth. To use Spotlight as a dictionary, all you have to do is type in the word that you’re looking to define. The definition will pop up as a top search result. Simply select it and the full dictionary will open giving you the full definition of the term you’re searching for.

Create an IP Alias in Mac OS X using ifconfig

In some trickier network situations, you may be assigned an IP but need an entirely different IP address to access certain network resources, but how on earth do you have two IP addresses at once? Create an IP Alias! It’s easy to do with the Mac OS X command line utility ifconfig. Type the following at the command line prompt to alias the new IP of 192.168.0.101 to your existing subnet mask
sudo ifconfig en0 alias 192.168.0.101 255.255.255.0 If you want to get rid of the alias, just type:
sudo ifconfig en0 -alias 192.168.0.101

How to spoof your MAC address in Mac OS X

Retrieving your current MAC address

Launch the Terminal and type the following command:
ifconfig en1 | grep ether
You’ll know see something like:
ether 00:12:cb:c6:24:e2

Spoofing a MAC addressTo spoof your MAC address, you simply set that value returned from ifconfig to another hex value in the format of aa:bb:cc:dd:ee:ff For this example, we will set our wireless MAC address to 00:e2:e3:e4:e5:e6 by issuing the following command:
sudo ifconfig en1 ether 00:e2:e3:e4:e5:e6

Verifying the Spoofed MAC address workedIf you want to check that the spoof worked, type the same command as earlier:

ifconfig en1 | grep ether
Now you will see:
ether 00:e2:e3:e4:e5:e6

How to Scan a Windows Network for Conficker Virus from Mac OS X

The Conficker Virus is Windows only but it’s garnering a lot of attention, so if you’re on a Windows LAN at home, work, or school, you may want to check if the Windows machines are vulnerable or infected with Conficker. You can do this from your immune Mac OS X machine pretty easily with a cool command line utility called nmap. Here are the steps:

1) First you need to install the command line tool nmap
2) Use nmap to search your LAN for vulnerabilities to Conficker by using the following command:
nmap -PN -T4 -p139,445 -n -v –script=smb-check-vulns –script-args safe=1 192.168.0.1-254
Note: Be sure to substitute the IP range for your LAN, so this may be something other than the IP range above, like 10.1.1.10-100 3) Examine the output of nmap, you are looking for something like this to tell if you have a problem:
Host script results:
| smb-check-vulns:
| MS08-067: FIXED
| Conficker: Likely INFECTED
|_ regsvc DoS: VULNERABLE