Mac Tips and Hints

Aus Peter Fuerholz' Wiki
Zur Navigation springen Zur Suche springen

Special Characters

Macs are fine computers with very good finish. Nevertheless I don't understand why typing certain characters, which are important for developers are so complicated (and not assigned on the keyboard):

Home
cmd-Left
Select from cursor to left Ctrl-Shift-Left
End
cmd-Right
Select from cursor to right
Ctrl-Shift-Right
Del
fn-Backspace
[
Alt-5
]
Alt-6
|
Alt-7
{
Alt-8
}
Alt-9
´
Alt-^
~
Alt-N

Shortcuts

There are some shortcuts working in most programs similar to Windows:

cmd-S
Save (instead of Ctrl-)
cmd-A
Select all
cmd-C
Copy selection
cmd-X
Move selection
cmd-V
Paste

General Tricks

Back from full-screen
Press Esc or move mouse pointer to top left and click green bubble

Bash Scripting

Since OS X is based on BSD Unix the terminal works rather the same as on other *nix systems.

Mount NAS and bind into home directory

OLD

I have a lot of pictures, files, backups etc. on my NAS so it is important to get to this files instantly. In Finder the share could be easily mounted but I wanted a more integrated way:

  • Create mount script with following content (use Sublime, not Script Editor which produces binary files!)
 #!/bin/bash
 mkdir /Volumes/Feuerwehr
 mkdir /Volumes/FwMaterial
 mkdir /Volumes/Music
 mkdir /Volumes/MyDocuments
 mkdir /Volumes/NfsShare
 mkdir /Volumes/Video
 mkdir /Volumes/Photos
 mount_smbfs //<username>:<pw>@N3200/Feuerwehr /Volumes/Feuerwehr
 mount_smbfs //<username>:<pw>@N3200/FwMaterial /Volumes/FwMaterial
 mount_smbfs //<username>:<pw>@N3200/Music /Volumes/Music
 mount_smbfs //<username>:<pw>@N3200/MyDocuments /Volumes/MyDocuments
 mount_smbfs //<username>:<pw>@N3200/NfsShare /Volumes/NfsShare
 mount_smbfs //<username>:<pw>@N3200/Video /Volumes/Video
 mount_smbfs //<username>:<pw>@N3200/Photos /Volumes/Photos
  • change file flags:
  chmod u+x <filename>.sh
  • execute it
  • create some links:
 ln -s /Volumes/FwMaterial/ ~/Documents/N3200FwMaterial
 etc.

Run this script on startup

See here. I did it with the Automator.

Sublime

Initially Sublime cannot be called from the command line. Create a link to fix this:

 ln -s "/Applications/Sublime Text.app/Contents/SharedSuport/bin/subl" /usr/local/bin/sublime

See [1]

Take Screenshots

Command-Shift-3
whole screen
Command-Shift-4
selected by mouse; press space bar to select a window

More

Burn CDs

Finder
Moving files into CD folder is very annoying and ???
Wondershare DVD Creator
Was not able to create a DVD containing file structure. (just wanted them on one level only...)
Burn
Works with DVD-DL (Dual Layer) after configured in within the Preferences, Default sizes

Using Mac's DVD player with Ubuntu

See here http://cmos.blog/use-apples-usb-superdrive-with-linux/