Wednesday, May 8, 2013

How to format SD card or USB drive in FAT16 in Mac OS

Postby tankstar » Sat Sep 13, 2008 1:56 am
http://forums.adafruit.com/viewtopic.php?f=31&t=7108

Got it. I'm playing your hello world. This is probably helpful for other Mac users so here is the link for how to reformat your SD card for FAT16: 

http://discussions.apple.com/thread.jsp ... ID=1302331 

Here is the instructions by infogeek2: 

To format the SD card, you will need the path to the SD card device and the SD card device number. 
1. Insert the SD Card into a card reader. 
2. If you don't know how to find the device number of the SD Card, here is one way to do it: 
2b. Open Disk Utility 
2c. Highlight the SD Card device (upper icon), not the SD Card volume (lower icon) 
2d. Click Erase at the top of the window 
2e. Select Volume Format: MS-DOS (FAT) Click Erase... > Click Erase 
The SD Card Volume Name will change to the UNIX device number e.g. "disk5s1". Note this number as it will change by itself to "Untitled". It is now formatted in MS-DOS FAT 32. We need to reformat it in FAT 16. 

Once you have the device number of the SD Card, you need the path to the SD card device. 
3. For my Mac, the path to devices is "/dev". In a terminal window: type "cd /dev" and hit the "Return" key to go to the "dev" directory. Then type "ls" (with a lower case L) and "Return" key. You should see the SD Card device number listed. 

Formatting the SD Card in FAT 16: 
4. In Disk Utility, highlight the SD Card device and click Unmount at the top, not Eject. The desktop icon of the SD card will disappear. 
5. Go to the Terminal window. Be careful to type the following command with the correct letter case and spacing. Again, make sure you type the correct device number and path as you can very easily erase your hard drive in UNIX. 
Type the command: 
newfs_msdos -F 16 (path to SD Card device)/(SD Card device number) 
e.g. newfs_msdos -F 16 /dev/disk5s1 
and hit the "Return" key. 
6. If you get just a new prompt (or a prompt with some warnings, e.g. below), the command executed successfully. You can remove the SD Card; it is now formatted in FAT 16. You can verify this in Disk Utility after mounting the SD Card. 
If you get some instructions on the newfs_msdos command with a new prompt, the command did not execute. Make sure you enter the command with the correct case and spacing. Hint: to re-enter a previous command you typed, hit the up arrow repeatedly. For more information, type: "man newfs_msdos". Scroll with arrow keys. Type "q" to quit and return to prompt. 

Warnings Example 
newfs_msdos: warning: /dev/disk5s1 is not a character device 
/dev/disk5s1: 1998208 sectors in 62444 FAT16 clusters (16384 bytes/cluster) 
bps=512 spc=32 res=1 nft=2 rde=512 mid=0xf0 spf=244 spt=32 hds=128 hid=0 bsec=1998738

Thursday, September 27, 2012

Cannot empty trash because item is in use


http://hints.macworld.com/article.php?story=20110105041622966

Cannot empty trash because item is in use 
System
Sometimes it is not possible to empty the trash because an item is in use. There are many possible causes for this; here is one thing to try to eliminate the error.
  • Go to Finder and select Finder » Secure Empty Trash.
  • If this operation gets stuck, open the Activity Monitor utility and force quit the Locum process.
    Enter your admin password when requested.
  • Go back to Finder and select Finder » Empty Trash.
This fixed it for me.

[crarko adds: I found this thread in the MacOSXHints forums where the Locum process is discussed. It references a good source for finding out more information about this process. By the way, the word 'Locum' means 'place-holder' or perhaps 'temporary proxy' is more applicable in this case. Apparently it fills in for the Finder in the background while emptying the Trash. It also can consume quite a bit of memory while doing so with a large number of files.]


Wednesday, August 22, 2012

Delete stubborn files

Mini-tutorial: Force-deleting stubborn or problematic files in Mac OS X

 

Mac OS X can experience difficulty deleting certain files due to the following (and other) reasons:
  1. The file is in use by an application or system process
  2. The file is locked
  3. The user does not have permission to delete the file
  4. The file is damaged or otherwise corrupt and "cannot be found" by the system
A. (File in use) If you receive an error message indicating the the file is in use by an application, try one of the following:
  • Quit any and all applications you think might be using the file
  • Open Activity Monitor (located in /Applications/Utilities) and kill any processes you think might be using the file (for more on killing processes with Activity Monitor, see this article)
You can also restart, which may put an end to lingering processes that are unnecessarily making use of files you are attempting to delete.
B., C., D. (file is locked, user does not have permission, file is damaged) Select the file in the Finder and press the Command and I keys simultaneously (or select "Get Info" from the File menu). Try to deselect the box next to "Locked." If the box is grayed out and you cannot change the locked status, you do not have permission to modify the file. In this case, try one of the following:
Use Secure Empty Trash The simplest workaround and the first one you should try is to drag the problematic file to the Trash, then (while in the Finder) select "Secure Empty Trash" from the "File" menu.
Modify permissions
  1. Select the file in the Finder. Hold down the option key, then go to the "File" menu and select "Show Inspector" (this item replaces "Get Info" when the option key is held)
  2. Go to the "Ownership and Permissions" section, then click the "Details" disclosure arrow.
  3. Click the small lock icon next to the "owner" menu, and enter your administrator password.
  4. Change ownership to your administrator account.
  5. From the "You can:" menu, select "Read and write"
  6. You should now be able to uncheck the "Locked" box and delete the file
Change lock flag via Terminal You can also manually unlock files via the Terminal with the following command:
  • chflags nouchg nameoffile
After which you can attempt deletion from the Trash, or use the Terminal delete command listed below.
Delete via the Terminal Failing the above, use the following command in Terminal (located in ~/Applications/Utilities)
  • sudo rm -R
followed by the location of the file you are trying to delete, e.g.:
  • sudo rm -R "/Applications/Photoshop CS2/legal/Tieng Viet.html"
Use Force Delete Finally, there is a freeware application dubbed Force Delete that can sometimes delete persistently locked and otherwise stubborn files.
The aforementioned workarounds can also be useful in a situation where Mac OS X says that the file marked for deletion "cannot be found," or generates a numbered error.

Saturday, March 5, 2011

See which files were modified in last Time Machine backup

- Download timedog: http://code.google.com/p/timedog/
- Copy it in root (Macintosh HD)
- Open terminal:

cd "/Volumes/Time Machine Backups/Backups.backupdb/*************’s MacBook Pro"
/timedog -d 5 -l

(where 5 is the depth of directory levels searched)

Sunday, February 13, 2011

Problems with Vmware fusion

"Failed to lock main memory file" when restoring suspended machine: open package and delete .lck file
"The CMOS of this virtual machine is incompatible with the current version of VMWare Fusion" when starting the machine: open package and delete .nvram file