Editing a crontab
Because I do this so infrequently and always wonder why I haven’t posted it before-
Editing a crontab:
crontab -e
i for insert mode
esc to command mode
ZZ to save and exit
Because I do this so infrequently and always wonder why I haven’t posted it before-
Editing a crontab:
crontab -e
i for insert mode
esc to command mode
ZZ to save and exit
Dan Frakes has a nice writeup on AppleJack 1.5 as part of MacWorld’s Mac Gems series.
It’s surprisingly easy to get remote applications up and running in Apple’s X11 environment. Once installed on your Mac, fire it up and add one additional parameter to your remote SSH connection +X.
ssh -X .(JavaScript must be enabled to view this email address)
Once you’re in, just start the application you want from the command line. Here, I typed “firefox” and now I have firefox 3 running in its full X11 glory on a remote computer.
More detailed information can be found on Apple’s Configuring and Running X11 Applications on Mac OS X page.
My favorite system maintenance tool, AppleJack, has finally been released for Leopard.
AppleJack down and dirty, but user-friendly troubleshooting tool for Mac OS X. It runs in Single User Mode and runs as a menu-based app for ease of use. This allows you to troubleshoot a computer even when the GUI isn’t available and without using a boot CD.
I’ve been spending a large amount of time in the MacOSX terminal lately. Naturally, I had to install a few fun terminal toys: (yes, I know both been out for a while)
Visor: gives you keyboard shortcut and slick animation to reveal a terminal window, similar to the Quake console
GeekTool: is a PrefPane that can overlay terminal output on your desktop. Very useful for watching system logs, graphs or any long-running process
To run a cron script every 30 minutes, specify minute intervals of both on the hour and 30 minutes past the hour separated by a comma.
0,30 * * * * wget http://dfbills.com > /dev/null
And to suppress email notifications:
0,30 * * * * wget http://dfbills.com >> /dev/null 2>&1
The >> /dev/null 2>&1 part sends the standard output to /dev/null and redirects standard error (2) to the same place as standard output (1).
Somehow my iTunes arrows got changed back to default- clicking takes you to an iTunes Music Store search. I prefer to change the iTunes arrows to point to my local
library. Of course, you can always hold down “option” to modify this behavior, but I like to just grab my bluetooth mouse and forget the keyboard when navigating from my couch.
To change iTunes arrows to local:
defaults write com.apple.iTunes invertStoreLinks -bool YES
MacOSX Leopard tags files downloaded from the web with a special metadata bit. This bit is later referenced to warn about running downloaded apps and scripts. Even archived files maintain this tag through the compression/decompress process.
I needed to update the firmware on my Canon PowerShot SD1000 camera and couldn’t get the camera to recognize the file. Turns out the com.apple.quarantine xattribute was set. To fix:
xattr -d com.apple.quarantine *.FIR
xattr does not have a man entry. Use:
xattr -h
I found most of my information on this helpful post.
John C. Welch posted a handy AppleScript which grabs selected addresses from Apple Remote Desktop and opens SSH sessions in the terminal for each one. Hard to believe this isn’t built into ARD. I’d previously used a hard coded AppleScript to open up these sessions. Having them opened from the live scan list is very handy!
I took out the hard coded username in the SSH string and added an activate command to the terminal to bring the windows to the front.
set theSSHList to {}
tell application “Remote Desktop”
set theComputers to the selection
repeat with x in theComputers
set the end of theSSHList to Internet address of x
end repeat
end tell
tell application “Terminal”
activate
repeat with x in theSSHList
do script “ssh ” & (contents of x)
end repeat
end tell
Here’s how to expand all those pesky minimized print dialog boxes in Leopard:
defaults write /Library/Preferences/.GlobalPreferences PMPrintingExpandedStateForPrint -bool TRUE
ah, that’s better.