Time Machine unbearably slow?

For me, time machine was unbearably slow when I first backuped my 500+ GB of data sitting on my hard drive. Backup rates of 5 kb/s --- yikes. Turns out that this was easy to fix:

  1. Turn off time machine, set the backup disk to none.
  2. Erase your back-up disk or at least the file on it in Backups.backupdb saying "inProgress" at the end.
  3. Turn off spotlight by excluding all disks.
  4. Reboot your computer.
  5. Turn on time machine, set backup disk to its name.
  6. Do "Backup Now" in the time machine menu.
  7. After completion of the first backup, turn on Spotlight but exclude the backup disk.

That should do the trick...

Renaming many files

If you want to rename many files in many directories, use

find . -type f -name "*.fdf" -print | sed 's/\(.*\)\.fdf/ & \1.pdf/' | xargs -L1 mv

Change login screen background

There is a simple way of changing the login screen in OS X (10.5 only), just replace the DefaultDesktop.jpg in /System/Library/CoreServices

Alternatively, type

sudo defaults write \
/Library/Preferences/com.apple.loginwindow \
DesktopPicture "/Library/Desktop Pictures/Aqua Blue.jpg"

Synchronizing two Macs

Recently, I sat in a conference with Drew Bagnell and we realized that we had the same scheme for synchronizing our computers at work and home. Both of us consider synchronizing over the network as too slow for a daily or even weekly synchronization, however, when you use Synk which is developed by CMU's starving Ph.D. student Ben Rister, buy a 60 GB iPod (which are usually cheap in University Bookstores) and synchronize your iPod, you get the maximum performance. Additionally, you can always take your homedirectory with you - even when you don't get to take your labtop.

SCP'ing very lager Files Overseas

We all disdain FTP for its low security standards. But they had reget - which we do not have in SCP. Luckily, we can instead use

rsync --partial source.file target.file

which is just as good.

Disabling in Browser Viewing for Safari

I hate browser viewing in Safari. You can disable it for Preview by

  1. Close Safari
  2. type this in a terminal: defaults write com.apple.Safari WebKitOmitPDFSupport -bool YES

and for Acrobat using

  1. Login as adm
  2. type this in a terminal: sudo rm -r /Library/Internet\ Plug-Ins/AdobePDFViewer.plugin

Running your Screensaver as Background Image

Type

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/ Contents/MacOS/ScreenSaverEngine -background &

and your screensaver will be your background image.

Lyx vs Swp

Disable Spotlight

If you have a mounted drive, for example, and you don’t want it to be indexed by Spotlight, you can open the Terminal application and enter the following command to turn off indexing. This may be useful if you have a mounted external drive that you use for cloning your startup disk. When you search in Spotlight, you may not want results to be shown if the files appear on this disk.

sudo mdutil -i off /Volumes/Diskname

(Note: Change “Diskname” above to the name of the volume for which you are turning Spotlight off.) You can also turn off Spotlight for your startup disk with the following command in the terminal.

sudo mdutil -i off /

If you decide later that you want to turn Spotlight back on, simply type whichever command you just typed in the Terminal, but replace “off” with “on”. Note that turning off Spotlight on any volume immediately turns off indexing on that volume.